Commit be65f9ed authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

staging: lustre: delete the filesystem from the tree.

The Lustre filesystem has been in the kernel tree for over 5 years now.
While it has been an endless source of enjoyment for new kernel
developers learning how to do basic codingstyle cleanups, as well as an
semi-entertaining source of bewilderment from the vfs developers any
time they have looked into the codebase to try to figure out how to port
their latest api changes to this filesystem, it has not really moved
forward into the "this is in shape to get out of staging" despite many
half-completed attempts.

And getting code out of staging is the main goal of that portion of the
kernel tree.  Code should not stagnate and it feels like having this
code in staging is only causing the development cycle of the filesystem
to take longer than it should.  There is a whole separate out-of-tree
copy of this codebase where the developers work on it, and then random
changes are thrown over the wall at staging at some later point in time.
This dual-tree development model has never worked, and the state of this
codebase is proof of that.

So, let's just delete the whole mess.  Now the lustre developers can go
off and work in their out-of-tree codebase and not have to worry about
providing valid changelog entries and breaking their patches up into
logical pieces.  They can take the time they have spend doing those
types of housekeeping chores and get the codebase into a much better
shape, and it can be submitted for inclusion into the real part of the
kernel tree when ready.

Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3b93c0f4
......@@ -13329,15 +13329,6 @@ S: Odd Fixes
F: Documentation/devicetree/bindings/staging/iio/
F: drivers/staging/iio/
STAGING - LUSTRE PARALLEL FILESYSTEM
M: Oleg Drokin <oleg.drokin@intel.com>
M: Andreas Dilger <andreas.dilger@intel.com>
M: James Simmons <jsimmons@infradead.org>
L: lustre-devel@lists.lustre.org (moderated for non-subscribers)
W: http://wiki.lustre.org/
S: Maintained
F: drivers/staging/lustre
STAGING - NVIDIA COMPLIANT EMBEDDED CONTROLLER INTERFACE (nvec)
M: Marc Dietrich <marvin24@gmx.de>
L: ac100@lists.launchpad.net (moderated for non-subscribers)
......
......@@ -84,8 +84,6 @@ source "drivers/staging/netlogic/Kconfig"
source "drivers/staging/mt29f_spinand/Kconfig"
source "drivers/staging/lustre/Kconfig"
source "drivers/staging/dgnc/Kconfig"
source "drivers/staging/gs_fpgaboot/Kconfig"
......
......@@ -32,7 +32,6 @@ obj-$(CONFIG_STAGING_BOARD) += board/
obj-$(CONFIG_LTE_GDM724X) += gdm724x/
obj-$(CONFIG_FIREWIRE_SERIAL) += fwserial/
obj-$(CONFIG_GOLDFISH) += goldfish/
obj-$(CONFIG_LNET) += lustre/
obj-$(CONFIG_DGNC) += dgnc/
obj-$(CONFIG_MTD_SPINAND_MT29F) += mt29f_spinand/
obj-$(CONFIG_GS_FPGABOOT) += gs_fpgaboot/
......
source "drivers/staging/lustre/lnet/Kconfig"
source "drivers/staging/lustre/lustre/Kconfig"
obj-$(CONFIG_LNET) += lnet/
obj-$(CONFIG_LUSTRE_FS) += lustre/
Lustre Parallel Filesystem Client
=================================
The Lustre file system is an open-source, parallel file system
that supports many requirements of leadership class HPC simulation
environments.
Born from a research project at Carnegie Mellon University,
the Lustre file system is a widely-used option in HPC.
The Lustre file system provides a POSIX compliant file system interface,
can scale to thousands of clients, petabytes of storage and
hundreds of gigabytes per second of I/O bandwidth.
Unlike shared disk storage cluster filesystems (e.g. OCFS2, GFS, GPFS),
Lustre has independent Metadata and Data servers that clients can access
in parallel to maximize performance.
In order to use Lustre client you will need to download the "lustre-client"
package that contains the userspace tools from http://lustre.org/download/
You will need to install and configure your Lustre servers separately.
Mount Syntax
============
After you installed the lustre-client tools including mount.lustre binary
you can mount your Lustre filesystem with:
mount -t lustre mgs:/fsname mnt
where mgs is the host name or ip address of your Lustre MGS(management service)
fsname is the name of the filesystem you would like to mount.
Mount Options
=============
noflock
Disable posix file locking (Applications trying to use
the functionality will get ENOSYS)
localflock
Enable local flock support, using only client-local flock
(faster, for applications that require flock but do not run
on multiple nodes).
flock
Enable cluster-global posix file locking coherent across all
client nodes.
user_xattr, nouser_xattr
Support "user." extended attributes (or not)
user_fid2path, nouser_fid2path
Enable FID to path translation by regular users (or not)
checksum, nochecksum
Verify data consistency on the wire and in memory as it passes
between the layers (or not).
lruresize, nolruresize
Allow lock LRU to be controlled by memory pressure on the server
(or only 100 (default, controlled by lru_size proc parameter) locks
per CPU per server on this client).
lazystatfs, nolazystatfs
Do not block in statfs() if some of the servers are down.
32bitapi
Shrink inode numbers to fit into 32 bits. This is necessary
if you plan to reexport Lustre filesystem from this client via
NFSv4.
verbose, noverbose
Enable mount/umount console messages (or not)
More Information
================
You can get more information at the Lustre website: http://wiki.lustre.org/
Source for the userspace tools and out-of-tree client and server code
is available at: http://git.hpdd.intel.com/fs/lustre-release.git
Latest binary packages:
http://lustre.org/download/
This diff is collapsed.
// SPDX-License-Identifier: GPL-2.0
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2011, 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*/
#ifndef __LIBCFS_LIBCFS_H__
#define __LIBCFS_LIBCFS_H__
#include <linux/notifier.h>
#include <linux/workqueue.h>
#include <linux/sysctl.h>
#include <linux/libcfs/libcfs_debug.h>
#include <linux/libcfs/libcfs_private.h>
#include <linux/libcfs/libcfs_fail.h>
#define LIBCFS_VERSION "0.7.0"
extern struct blocking_notifier_head libcfs_ioctl_list;
static inline int notifier_from_ioctl_errno(int err)
{
if (err == -EINVAL)
return NOTIFY_OK;
return notifier_from_errno(err) | NOTIFY_STOP_MASK;
}
int libcfs_setup(void);
extern struct workqueue_struct *cfs_rehash_wq;
void lustre_insert_debugfs(struct ctl_table *table);
int lprocfs_call_handler(void *data, int write, loff_t *ppos,
void __user *buffer, size_t *lenp,
int (*handler)(void *data, int write, loff_t pos,
void __user *buffer, int len));
/*
* Memory
*/
#if BITS_PER_LONG == 32
/* limit to lowmem on 32-bit systems */
#define NUM_CACHEPAGES \
min(totalram_pages, 1UL << (30 - PAGE_SHIFT) * 3 / 4)
#else
#define NUM_CACHEPAGES totalram_pages
#endif
#endif /* __LIBCFS_LIBCFS_H__ */
// SPDX-License-Identifier: GPL-2.0
/* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see http://www.gnu.org/licenses
*
* Please visit http://www.xyratex.com/contact if you need additional
* information or have any questions.
*
* GPL HEADER END
*/
/*
* Copyright 2012 Xyratex Technology Limited
*/
#ifndef _LIBCFS_CRYPTO_H
#define _LIBCFS_CRYPTO_H
#include <linux/string.h>
struct page;
struct cfs_crypto_hash_type {
char *cht_name; /*< hash algorithm name, equal to
* format name for crypto api
*/
unsigned int cht_key; /*< init key by default (valid for
* 4 bytes context like crc32, adler
*/
unsigned int cht_size; /**< hash digest size */
};
enum cfs_crypto_hash_alg {
CFS_HASH_ALG_NULL = 0,
CFS_HASH_ALG_ADLER32,
CFS_HASH_ALG_CRC32,
CFS_HASH_ALG_MD5,
CFS_HASH_ALG_SHA1,
CFS_HASH_ALG_SHA256,
CFS_HASH_ALG_SHA384,
CFS_HASH_ALG_SHA512,
CFS_HASH_ALG_CRC32C,
CFS_HASH_ALG_MAX,
CFS_HASH_ALG_UNKNOWN = 0xff
};
static struct cfs_crypto_hash_type hash_types[] = {
[CFS_HASH_ALG_NULL] = {
.cht_name = "null",
.cht_key = 0,
.cht_size = 0
},
[CFS_HASH_ALG_ADLER32] = {
.cht_name = "adler32",
.cht_key = 1,
.cht_size = 4
},
[CFS_HASH_ALG_CRC32] = {
.cht_name = "crc32",
.cht_key = ~0,
.cht_size = 4
},
[CFS_HASH_ALG_CRC32C] = {
.cht_name = "crc32c",
.cht_key = ~0,
.cht_size = 4
},
[CFS_HASH_ALG_MD5] = {
.cht_name = "md5",
.cht_key = 0,
.cht_size = 16
},
[CFS_HASH_ALG_SHA1] = {
.cht_name = "sha1",
.cht_key = 0,
.cht_size = 20
},
[CFS_HASH_ALG_SHA256] = {
.cht_name = "sha256",
.cht_key = 0,
.cht_size = 32
},
[CFS_HASH_ALG_SHA384] = {
.cht_name = "sha384",
.cht_key = 0,
.cht_size = 48
},
[CFS_HASH_ALG_SHA512] = {
.cht_name = "sha512",
.cht_key = 0,
.cht_size = 64
},
[CFS_HASH_ALG_MAX] = {
.cht_name = NULL,
.cht_key = 0,
.cht_size = 64
},
};
/* Maximum size of hash_types[].cht_size */
#define CFS_CRYPTO_HASH_DIGESTSIZE_MAX 64
/**
* Return hash algorithm information for the specified algorithm identifier
*
* Hash information includes algorithm name, initial seed, hash size.
*
* \retval cfs_crypto_hash_type for valid ID (CFS_HASH_ALG_*)
* \retval NULL for unknown algorithm identifier
*/
static inline const struct cfs_crypto_hash_type *
cfs_crypto_hash_type(enum cfs_crypto_hash_alg hash_alg)
{
struct cfs_crypto_hash_type *ht;
if (hash_alg < CFS_HASH_ALG_MAX) {
ht = &hash_types[hash_alg];
if (ht->cht_name)
return ht;
}
return NULL;
}
/**
* Return hash name for hash algorithm identifier
*
* \param[in] hash_alg hash alrgorithm id (CFS_HASH_ALG_*)
*
* \retval string name of known hash algorithm
* \retval "unknown" if hash algorithm is unknown
*/
static inline const char *
cfs_crypto_hash_name(enum cfs_crypto_hash_alg hash_alg)
{
const struct cfs_crypto_hash_type *ht;
ht = cfs_crypto_hash_type(hash_alg);
if (ht)
return ht->cht_name;
return "unknown";
}
/**
* Return digest size for hash algorithm type
*
* \param[in] hash_alg hash alrgorithm id (CFS_HASH_ALG_*)
*
* \retval hash algorithm digest size in bytes
* \retval 0 if hash algorithm type is unknown
*/
static inline int cfs_crypto_hash_digestsize(enum cfs_crypto_hash_alg hash_alg)
{
const struct cfs_crypto_hash_type *ht;
ht = cfs_crypto_hash_type(hash_alg);
if (ht)
return ht->cht_size;
return 0;
}
/**
* Find hash algorithm ID for the specified algorithm name
*
* \retval hash algorithm ID for valid ID (CFS_HASH_ALG_*)
* \retval CFS_HASH_ALG_UNKNOWN for unknown algorithm name
*/
static inline unsigned char cfs_crypto_hash_alg(const char *algname)
{
enum cfs_crypto_hash_alg hash_alg;
for (hash_alg = 0; hash_alg < CFS_HASH_ALG_MAX; hash_alg++)
if (!strcmp(hash_types[hash_alg].cht_name, algname))
return hash_alg;
return CFS_HASH_ALG_UNKNOWN;
}
int cfs_crypto_hash_digest(enum cfs_crypto_hash_alg hash_alg,
const void *buf, unsigned int buf_len,
unsigned char *key, unsigned int key_len,
unsigned char *hash, unsigned int *hash_len);
struct ahash_request *
cfs_crypto_hash_init(enum cfs_crypto_hash_alg hash_alg,
unsigned char *key, unsigned int key_len);
int cfs_crypto_hash_update_page(struct ahash_request *desc,
struct page *page, unsigned int offset,
unsigned int len);
int cfs_crypto_hash_update(struct ahash_request *desc, const void *buf,
unsigned int buf_len);
int cfs_crypto_hash_final(struct ahash_request *desc,
unsigned char *hash, unsigned int *hash_len);
int cfs_crypto_register(void);
void cfs_crypto_unregister(void);
int cfs_crypto_hash_speed(enum cfs_crypto_hash_alg hash_alg);
#endif
// SPDX-License-Identifier: GPL-2.0
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
* libcfs/include/libcfs/libcfs_debug.h
*
* Debug messages and assertions
*
*/
#ifndef __LIBCFS_DEBUG_H__
#define __LIBCFS_DEBUG_H__
#include <linux/limits.h>
#include <uapi/linux/lnet/libcfs_debug.h>
/*
* Debugging
*/
extern unsigned int libcfs_subsystem_debug;
extern unsigned int libcfs_stack;
extern unsigned int libcfs_debug;
extern unsigned int libcfs_printk;
extern unsigned int libcfs_console_ratelimit;
extern unsigned int libcfs_console_max_delay;
extern unsigned int libcfs_console_min_delay;
extern unsigned int libcfs_console_backoff;
extern unsigned int libcfs_debug_binary;
extern char libcfs_debug_file_path_arr[PATH_MAX];
int libcfs_debug_mask2str(char *str, int size, int mask, int is_subsys);
int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys);
/* Has there been an LBUG? */
extern unsigned int libcfs_catastrophe;
extern unsigned int libcfs_panic_on_lbug;
/* Enable debug-checks on stack size - except on x86_64 */
#if !defined(__x86_64__)
# ifdef __ia64__
# define CDEBUG_STACK() (THREAD_SIZE - \
((unsigned long)__builtin_dwarf_cfa() & \
(THREAD_SIZE - 1)))
# else
# define CDEBUG_STACK() (THREAD_SIZE - \
((unsigned long)__builtin_frame_address(0) & \
(THREAD_SIZE - 1)))
# endif /* __ia64__ */
#define __CHECK_STACK(msgdata, mask, cdls) \
do { \
if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \
LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \
libcfs_stack = CDEBUG_STACK(); \
libcfs_debug_msg(msgdata, \
"maximum lustre stack %lu\n", \
CDEBUG_STACK()); \
(msgdata)->msg_mask = mask; \
(msgdata)->msg_cdls = cdls; \
dump_stack(); \
/*panic("LBUG");*/ \
} \
} while (0)
#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls)
#else /* __x86_64__ */
#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0)
#define CDEBUG_STACK() (0L)
#endif /* __x86_64__ */
#ifndef DEBUG_SUBSYSTEM
# define DEBUG_SUBSYSTEM S_UNDEFINED
#endif
#define CDEBUG_DEFAULT_MAX_DELAY (600 * HZ) /* jiffies */
#define CDEBUG_DEFAULT_MIN_DELAY ((HZ + 1) / 2) /* jiffies */
#define CDEBUG_DEFAULT_BACKOFF 2
struct cfs_debug_limit_state {
unsigned long cdls_next;
unsigned int cdls_delay;
int cdls_count;
};
struct libcfs_debug_msg_data {
const char *msg_file;
const char *msg_fn;
int msg_subsys;
int msg_line;
int msg_mask;
struct cfs_debug_limit_state *msg_cdls;
};
#define LIBCFS_DEBUG_MSG_DATA_INIT(data, mask, cdls) \
do { \
(data)->msg_subsys = DEBUG_SUBSYSTEM; \
(data)->msg_file = __FILE__; \
(data)->msg_fn = __func__; \
(data)->msg_line = __LINE__; \
(data)->msg_cdls = (cdls); \
(data)->msg_mask = (mask); \
} while (0)
#define LIBCFS_DEBUG_MSG_DATA_DECL(dataname, mask, cdls) \
static struct libcfs_debug_msg_data dataname = { \
.msg_subsys = DEBUG_SUBSYSTEM, \
.msg_file = __FILE__, \
.msg_fn = __func__, \
.msg_line = __LINE__, \
.msg_cdls = (cdls) }; \
dataname.msg_mask = (mask)
/**
* Filters out logging messages based on mask and subsystem.
*/
static inline int cfs_cdebug_show(unsigned int mask, unsigned int subsystem)
{
return mask & D_CANTMASK ||
((libcfs_debug & mask) && (libcfs_subsystem_debug & subsystem));
}
#define __CDEBUG(cdls, mask, format, ...) \
do { \
static struct libcfs_debug_msg_data msgdata; \
\
CFS_CHECK_STACK(&msgdata, mask, cdls); \
\
if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) { \
LIBCFS_DEBUG_MSG_DATA_INIT(&msgdata, mask, cdls); \
libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
} \
} while (0)
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## __VA_ARGS__)
#define CDEBUG_LIMIT(mask, format, ...) \
do { \
static struct cfs_debug_limit_state cdls; \
\
__CDEBUG(&cdls, mask, format, ## __VA_ARGS__); \
} while (0)
/*
* Lustre Error Checksum: calculates checksum
* of Hex number by XORing the nybbles.
*/
#define LERRCHKSUM(hexnum) (((hexnum) & 0xf) ^ ((hexnum) >> 4 & 0xf) ^ \
((hexnum) >> 8 & 0xf))
#define CWARN(format, ...) CDEBUG_LIMIT(D_WARNING, format, ## __VA_ARGS__)
#define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
#define CNETERR(format, a...) CDEBUG_LIMIT(D_NETERROR, format, ## a)
#define CEMERG(format, ...) CDEBUG_LIMIT(D_EMERG, format, ## __VA_ARGS__)
#define LCONSOLE(mask, format, ...) CDEBUG(D_CONSOLE | (mask), format, ## __VA_ARGS__)
#define LCONSOLE_INFO(format, ...) CDEBUG_LIMIT(D_CONSOLE, format, ## __VA_ARGS__)
#define LCONSOLE_WARN(format, ...) CDEBUG_LIMIT(D_CONSOLE | D_WARNING, format, ## __VA_ARGS__)
#define LCONSOLE_ERROR_MSG(errnum, format, ...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, \
"%x-%x: " format, errnum, LERRCHKSUM(errnum), ## __VA_ARGS__)
#define LCONSOLE_ERROR(format, ...) LCONSOLE_ERROR_MSG(0x00, format, ## __VA_ARGS__)
#define LCONSOLE_EMERG(format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__)
int libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata,
const char *format1, ...)
__printf(2, 3);
int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
const char *format1,
va_list args, const char *format2, ...)
__printf(4, 5);
/* other external symbols that tracefile provides: */
int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
const char __user *usr_buffer, int usr_buffer_nob);
int cfs_trace_copyout_string(char __user *usr_buffer, int usr_buffer_nob,
const char *knl_buffer, char *append);
#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
#endif /* __LIBCFS_DEBUG_H__ */
// SPDX-License-Identifier: GPL-2.0
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see http://www.gnu.org/licenses
*
* GPL HEADER END
*/
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2011, 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Oracle Corporation, Inc.
*/
#ifndef _LIBCFS_FAIL_H
#define _LIBCFS_FAIL_H
#include <linux/sched.h>
#include <linux/wait.h>
extern unsigned long cfs_fail_loc;
extern unsigned int cfs_fail_val;
extern int cfs_fail_err;
extern wait_queue_head_t cfs_race_waitq;
extern int cfs_race_state;
int __cfs_fail_check_set(u32 id, u32 value, int set);
int __cfs_fail_timeout_set(u32 id, u32 value, int ms, int set);
enum {
CFS_FAIL_LOC_NOSET = 0,
CFS_FAIL_LOC_ORSET = 1,
CFS_FAIL_LOC_RESET = 2,
CFS_FAIL_LOC_VALUE = 3
};
/* Failure injection control */
#define CFS_FAIL_MASK_SYS 0x0000FF00
#define CFS_FAIL_MASK_LOC (0x000000FF | CFS_FAIL_MASK_SYS)
#define CFS_FAILED_BIT 30
/* CFS_FAILED is 0x40000000 */
#define CFS_FAILED BIT(CFS_FAILED_BIT)
#define CFS_FAIL_ONCE_BIT 31
/* CFS_FAIL_ONCE is 0x80000000 */
#define CFS_FAIL_ONCE BIT(CFS_FAIL_ONCE_BIT)
/* The following flags aren't made to be combined */
#define CFS_FAIL_SKIP 0x20000000 /* skip N times then fail */
#define CFS_FAIL_SOME 0x10000000 /* only fail N times */
#define CFS_FAIL_RAND 0x08000000 /* fail 1/N of the times */
#define CFS_FAIL_USR1 0x04000000 /* user flag */
#define CFS_FAULT 0x02000000 /* match any CFS_FAULT_CHECK */
static inline bool CFS_FAIL_PRECHECK(u32 id)
{
return cfs_fail_loc &&
((cfs_fail_loc & CFS_FAIL_MASK_LOC) == (id & CFS_FAIL_MASK_LOC) ||
(cfs_fail_loc & id & CFS_FAULT));
}
static inline int cfs_fail_check_set(u32 id, u32 value,
int set, int quiet)
{
int ret = 0;
if (unlikely(CFS_FAIL_PRECHECK(id))) {
ret = __cfs_fail_check_set(id, value, set);
if (ret) {
if (quiet) {
CDEBUG(D_INFO, "*** cfs_fail_loc=%x, val=%u***\n",
id, value);
} else {
LCONSOLE_INFO("*** cfs_fail_loc=%x, val=%u***\n",
id, value);
}
}
}
return ret;
}
/* If id hit cfs_fail_loc, return 1, otherwise return 0 */
#define CFS_FAIL_CHECK(id) \
cfs_fail_check_set(id, 0, CFS_FAIL_LOC_NOSET, 0)
#define CFS_FAIL_CHECK_QUIET(id) \
cfs_fail_check_set(id, 0, CFS_FAIL_LOC_NOSET, 1)
/*
* If id hit cfs_fail_loc and cfs_fail_val == (-1 or value) return 1,
* otherwise return 0
*/
#define CFS_FAIL_CHECK_VALUE(id, value) \
cfs_fail_check_set(id, value, CFS_FAIL_LOC_VALUE, 0)
#define CFS_FAIL_CHECK_VALUE_QUIET(id, value) \
cfs_fail_check_set(id, value, CFS_FAIL_LOC_VALUE, 1)
/*
* If id hit cfs_fail_loc, cfs_fail_loc |= value and return 1,
* otherwise return 0
*/
#define CFS_FAIL_CHECK_ORSET(id, value) \
cfs_fail_check_set(id, value, CFS_FAIL_LOC_ORSET, 0)
#define CFS_FAIL_CHECK_ORSET_QUIET(id, value) \
cfs_fail_check_set(id, value, CFS_FAIL_LOC_ORSET, 1)
/*
* If id hit cfs_fail_loc, cfs_fail_loc = value and return 1,
* otherwise return 0
*/
#define CFS_FAIL_CHECK_RESET(id, value) \
cfs_fail_check_set(id, value, CFS_FAIL_LOC_RESET, 0)
#define CFS_FAIL_CHECK_RESET_QUIET(id, value) \
cfs_fail_check_set(id, value, CFS_FAIL_LOC_RESET, 1)
static inline int cfs_fail_timeout_set(u32 id, u32 value, int ms, int set)
{
if (unlikely(CFS_FAIL_PRECHECK(id)))
return __cfs_fail_timeout_set(id, value, ms, set);
return 0;
}
/* If id hit cfs_fail_loc, sleep for seconds or milliseconds */
#define CFS_FAIL_TIMEOUT(id, secs) \
cfs_fail_timeout_set(id, 0, (secs) * 1000, CFS_FAIL_LOC_NOSET)
#define CFS_FAIL_TIMEOUT_MS(id, ms) \
cfs_fail_timeout_set(id, 0, ms, CFS_FAIL_LOC_NOSET)
/*
* If id hit cfs_fail_loc, cfs_fail_loc |= value and
* sleep seconds or milliseconds
*/
#define CFS_FAIL_TIMEOUT_ORSET(id, value, secs) \
cfs_fail_timeout_set(id, value, (secs) * 1000, CFS_FAIL_LOC_ORSET)
#define CFS_FAIL_TIMEOUT_RESET(id, value, secs) \
cfs_fail_timeout_set(id, value, (secs) * 1000, CFS_FAIL_LOC_RESET)
#define CFS_FAIL_TIMEOUT_MS_ORSET(id, value, ms) \
cfs_fail_timeout_set(id, value, ms, CFS_FAIL_LOC_ORSET)
#define CFS_FAULT_CHECK(id) \
CFS_FAIL_CHECK(CFS_FAULT | (id))
/*
* The idea here is to synchronise two threads to force a race. The
* first thread that calls this with a matching fail_loc is put to
* sleep. The next thread that calls with the same fail_loc wakes up
* the first and continues.
*/
static inline void cfs_race(u32 id)
{
if (CFS_FAIL_PRECHECK(id)) {
if (unlikely(__cfs_fail_check_set(id, 0, CFS_FAIL_LOC_NOSET))) {
int rc;
cfs_race_state = 0;
CERROR("cfs_race id %x sleeping\n", id);
rc = wait_event_interruptible(cfs_race_waitq,
!!cfs_race_state);
CERROR("cfs_fail_race id %x awake, rc=%d\n", id, rc);
} else {
CERROR("cfs_fail_race id %x waking\n", id);
cfs_race_state = 1;
wake_up(&cfs_race_waitq);
}
}
}
#define CFS_RACE(id) cfs_race(id)
#endif /* _LIBCFS_FAIL_H */
// SPDX-License-Identifier: GPL-2.0
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2011, 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
* libcfs/include/libcfs/libcfs_private.h
*
* Various defines for libcfs.
*
*/
#ifndef __LIBCFS_PRIVATE_H__
#define __LIBCFS_PRIVATE_H__
#ifndef DEBUG_SUBSYSTEM
# define DEBUG_SUBSYSTEM S_UNDEFINED
#endif
#define LASSERTF(cond, fmt, ...) \
do { \
if (unlikely(!(cond))) { \
LIBCFS_DEBUG_MSG_DATA_DECL(__msg_data, D_EMERG, NULL); \
libcfs_debug_msg(&__msg_data, \
"ASSERTION( %s ) failed: " fmt, #cond, \
## __VA_ARGS__); \
lbug_with_loc(&__msg_data); \
} \
} while (0)
#define LASSERT(cond) LASSERTF(cond, "\n")
#ifdef CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK
/**
* This is for more expensive checks that one doesn't want to be enabled all
* the time. LINVRNT() has to be explicitly enabled by
* CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK option.
*/
# define LINVRNT(exp) LASSERT(exp)
#else
# define LINVRNT(exp) ((void)sizeof !!(exp))
#endif
void __noreturn lbug_with_loc(struct libcfs_debug_msg_data *msg);
#define LBUG() \
do { \
LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, D_EMERG, NULL); \
lbug_with_loc(&msgdata); \
} while (0)
/*
* Use #define rather than inline, as lnet_cpt_table() might
* not be defined yet
*/
#define kmalloc_cpt(size, flags, cpt) \
kmalloc_node(size, flags, cfs_cpt_spread_node(lnet_cpt_table(), cpt))
#define kzalloc_cpt(size, flags, cpt) \
kmalloc_node(size, flags | __GFP_ZERO, \
cfs_cpt_spread_node(lnet_cpt_table(), cpt))
#define kvmalloc_cpt(size, flags, cpt) \
kvmalloc_node(size, flags, \
cfs_cpt_spread_node(lnet_cpt_table(), cpt))
#define kvzalloc_cpt(size, flags, cpt) \
kvmalloc_node(size, flags | __GFP_ZERO, \
cfs_cpt_spread_node(lnet_cpt_table(), cpt))
/******************************************************************************/
void libcfs_debug_dumplog(void);
int libcfs_debug_init(unsigned long bufsize);
int libcfs_debug_cleanup(void);
int libcfs_debug_clear_buffer(void);
int libcfs_debug_mark_buffer(const char *text);
/*
* allocate a variable array, returned value is an array of pointers.
* Caller can specify length of array by count.
*/
void *cfs_array_alloc(int count, unsigned int size);
void cfs_array_free(void *vars);
#define LASSERT_ATOMIC_ENABLED (1)
#if LASSERT_ATOMIC_ENABLED
/** assert value of @a is equal to @v */
#define LASSERT_ATOMIC_EQ(a, v) \
LASSERTF(atomic_read(a) == v, "value: %d\n", atomic_read((a)))
/** assert value of @a is unequal to @v */
#define LASSERT_ATOMIC_NE(a, v) \
LASSERTF(atomic_read(a) != v, "value: %d\n", atomic_read((a)))
/** assert value of @a is little than @v */
#define LASSERT_ATOMIC_LT(a, v) \
LASSERTF(atomic_read(a) < v, "value: %d\n", atomic_read((a)))
/** assert value of @a is little/equal to @v */
#define LASSERT_ATOMIC_LE(a, v) \
LASSERTF(atomic_read(a) <= v, "value: %d\n", atomic_read((a)))
/** assert value of @a is great than @v */
#define LASSERT_ATOMIC_GT(a, v) \
LASSERTF(atomic_read(a) > v, "value: %d\n", atomic_read((a)))
/** assert value of @a is great/equal to @v */
#define LASSERT_ATOMIC_GE(a, v) \
LASSERTF(atomic_read(a) >= v, "value: %d\n", atomic_read((a)))
/** assert value of @a is great than @v1 and little than @v2 */
#define LASSERT_ATOMIC_GT_LT(a, v1, v2) \
do { \
int __v = atomic_read(a); \
LASSERTF(__v > v1 && __v < v2, "value: %d\n", __v); \
} while (0)
/** assert value of @a is great than @v1 and little/equal to @v2 */
#define LASSERT_ATOMIC_GT_LE(a, v1, v2) \
do { \
int __v = atomic_read(a); \
LASSERTF(__v > v1 && __v <= v2, "value: %d\n", __v); \
} while (0)
/** assert value of @a is great/equal to @v1 and little than @v2 */
#define LASSERT_ATOMIC_GE_LT(a, v1, v2) \
do { \
int __v = atomic_read(a); \
LASSERTF(__v >= v1 && __v < v2, "value: %d\n", __v); \
} while (0)
/** assert value of @a is great/equal to @v1 and little/equal to @v2 */
#define LASSERT_ATOMIC_GE_LE(a, v1, v2) \
do { \
int __v = atomic_read(a); \
LASSERTF(__v >= v1 && __v <= v2, "value: %d\n", __v); \
} while (0)
#else /* !LASSERT_ATOMIC_ENABLED */
#define LASSERT_ATOMIC_EQ(a, v) do {} while (0)
#define LASSERT_ATOMIC_NE(a, v) do {} while (0)
#define LASSERT_ATOMIC_LT(a, v) do {} while (0)
#define LASSERT_ATOMIC_LE(a, v) do {} while (0)
#define LASSERT_ATOMIC_GT(a, v) do {} while (0)
#define LASSERT_ATOMIC_GE(a, v) do {} while (0)
#define LASSERT_ATOMIC_GT_LT(a, v1, v2) do {} while (0)
#define LASSERT_ATOMIC_GT_LE(a, v1, v2) do {} while (0)
#define LASSERT_ATOMIC_GE_LT(a, v1, v2) do {} while (0)
#define LASSERT_ATOMIC_GE_LE(a, v1, v2) do {} while (0)
#endif /* LASSERT_ATOMIC_ENABLED */
#define LASSERT_ATOMIC_ZERO(a) LASSERT_ATOMIC_EQ(a, 0)
#define LASSERT_ATOMIC_POS(a) LASSERT_ATOMIC_GT(a, 0)
/* implication */
#define ergo(a, b) (!(a) || (b))
/* logical equivalence */
#define equi(a, b) (!!(a) == !!(b))
#ifndef HAVE_CFS_SIZE_ROUND
static inline size_t cfs_size_round(int val)
{
return round_up(val, 8);
}
#define HAVE_CFS_SIZE_ROUND
#endif
#endif
// SPDX-License-Identifier: GPL-2.0
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
* libcfs/include/libcfs/libcfs_string.h
*
* Generic string manipulation functions.
*
* Author: Nathan Rutman <nathan.rutman@sun.com>
*/
#ifndef __LIBCFS_STRING_H__
#define __LIBCFS_STRING_H__
#include <linux/mm.h>
/* libcfs_string.c */
/* Convert a text string to a bitmask */
int cfs_str2mask(const char *str, const char *(*bit2str)(int bit),
int *oldmask, int minmask, int allmask);
/* trim leading and trailing space characters */
char *cfs_firststr(char *str, size_t size);
/**
* Structure to represent NULL-less strings.
*/
struct cfs_lstr {
char *ls_str;
int ls_len;
};
/*
* Structure to represent \<range_expr\> token of the syntax.
*/
struct cfs_range_expr {
/*
* Link to cfs_expr_list::el_exprs.
*/
struct list_head re_link;
u32 re_lo;
u32 re_hi;
u32 re_stride;
};
struct cfs_expr_list {
struct list_head el_link;
struct list_head el_exprs;
};
int cfs_gettok(struct cfs_lstr *next, char delim, struct cfs_lstr *res);
int cfs_str2num_check(char *str, int nob, unsigned int *num,
unsigned int min, unsigned int max);
int cfs_expr_list_match(u32 value, struct cfs_expr_list *expr_list);
int cfs_expr_list_print(char *buffer, int count,
struct cfs_expr_list *expr_list);
int cfs_expr_list_values(struct cfs_expr_list *expr_list,
int max, u32 **values);
static inline void
cfs_expr_list_values_free(u32 *values, int num)
{
/*
* This array is allocated by kvalloc(), so it shouldn't be freed
* by OBD_FREE() if it's called by module other than libcfs & LNet,
* otherwise we will see fake memory leak
*/
kvfree(values);
}
void cfs_expr_list_free(struct cfs_expr_list *expr_list);
int cfs_expr_list_parse(char *str, int len, unsigned int min, unsigned int max,
struct cfs_expr_list **elpp);
void cfs_expr_list_free_list(struct list_head *list);
#endif
// SPDX-License-Identifier: GPL-2.0
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2011 - 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Seagate, Inc.
*/
#ifndef __LNET_API_H__
#define __LNET_API_H__
/** \defgroup lnet LNet
*
* The Lustre Networking subsystem.
*
* LNet is an asynchronous message-passing API, which provides an unreliable
* connectionless service that can't guarantee any order. It supports OFA IB,
* TCP/IP, and Cray Interconnects, and routes between heterogeneous networks.
*
* @{
*/
#include <uapi/linux/lnet/lnet-types.h>
/** \defgroup lnet_init_fini Initialization and cleanup
* The LNet must be properly initialized before any LNet calls can be made.
* @{
*/
int LNetNIInit(lnet_pid_t requested_pid);
int LNetNIFini(void);
/** @} lnet_init_fini */
/** \defgroup lnet_addr LNet addressing and basic types
*
* Addressing scheme and basic data types of LNet.
*
* The LNet API is memory-oriented, so LNet must be able to address not only
* end-points but also memory region within a process address space.
* An ::lnet_nid_t addresses an end-point. An ::lnet_pid_t identifies a process
* in a node. A portal represents an opening in the address space of a
* process. Match bits is criteria to identify a region of memory inside a
* portal, and offset specifies an offset within the memory region.
*
* LNet creates a table of portals for each process during initialization.
* This table has MAX_PORTALS entries and its size can't be dynamically
* changed. A portal stays empty until the owning process starts to add
* memory regions to it. A portal is sometimes called an index because
* it's an entry in the portals table of a process.
*
* \see LNetMEAttach
* @{
*/
int LNetGetId(unsigned int index, struct lnet_process_id *id);
int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order);
/** @} lnet_addr */
/** \defgroup lnet_me Match entries
*
* A match entry (abbreviated as ME) describes a set of criteria to accept
* incoming requests.
*
* A portal is essentially a match list plus a set of attributes. A match
* list is a chain of MEs. Each ME includes a pointer to a memory descriptor
* and a set of match criteria. The match criteria can be used to reject
* incoming requests based on process ID or the match bits provided in the
* request. MEs can be dynamically inserted into a match list by LNetMEAttach()
* and LNetMEInsert(), and removed from its list by LNetMEUnlink().
* @{
*/
int LNetMEAttach(unsigned int portal,
struct lnet_process_id match_id_in,
__u64 match_bits_in,
__u64 ignore_bits_in,
enum lnet_unlink unlink_in,
enum lnet_ins_pos pos_in,
struct lnet_handle_me *handle_out);
int LNetMEInsert(struct lnet_handle_me current_in,
struct lnet_process_id match_id_in,
__u64 match_bits_in,
__u64 ignore_bits_in,
enum lnet_unlink unlink_in,
enum lnet_ins_pos position_in,
struct lnet_handle_me *handle_out);
int LNetMEUnlink(struct lnet_handle_me current_in);
/** @} lnet_me */
/** \defgroup lnet_md Memory descriptors
*
* A memory descriptor contains information about a region of a user's
* memory (either in kernel or user space) and optionally points to an
* event queue where information about the operations performed on the
* memory descriptor are recorded. Memory descriptor is abbreviated as
* MD and can be used interchangeably with the memory region it describes.
*
* The LNet API provides two operations to create MDs: LNetMDAttach()
* and LNetMDBind(); one operation to unlink and release the resources
* associated with a MD: LNetMDUnlink().
* @{
*/
int LNetMDAttach(struct lnet_handle_me current_in,
struct lnet_md md_in,
enum lnet_unlink unlink_in,
struct lnet_handle_md *md_handle_out);
int LNetMDBind(struct lnet_md md_in,
enum lnet_unlink unlink_in,
struct lnet_handle_md *md_handle_out);
int LNetMDUnlink(struct lnet_handle_md md_in);
/** @} lnet_md */
/** \defgroup lnet_eq Events and event queues
*
* Event queues (abbreviated as EQ) are used to log operations performed on
* local MDs. In particular, they signal the completion of a data transmission
* into or out of a MD. They can also be used to hold acknowledgments for
* completed PUT operations and indicate when a MD has been unlinked. Multiple
* MDs can share a single EQ. An EQ may have an optional event handler
* associated with it. If an event handler exists, it will be run for each
* event that is deposited into the EQ.
*
* In addition to the lnet_handle_eq, the LNet API defines two types
* associated with events: The ::lnet_event_kind defines the kinds of events
* that can be stored in an EQ. The lnet_event defines a structure that
* holds the information about with an event.
*
* There are five functions for dealing with EQs: LNetEQAlloc() is used to
* create an EQ and allocate the resources needed, while LNetEQFree()
* releases these resources and free the EQ. LNetEQGet() retrieves the next
* event from an EQ, and LNetEQWait() can be used to block a process until
* an EQ has at least one event. LNetEQPoll() can be used to test or wait
* on multiple EQs.
* @{
*/
int LNetEQAlloc(unsigned int count_in,
lnet_eq_handler_t handler,
struct lnet_handle_eq *handle_out);
int LNetEQFree(struct lnet_handle_eq eventq_in);
int LNetEQPoll(struct lnet_handle_eq *eventqs_in,
int neq_in,
int timeout_ms,
int interruptible,
struct lnet_event *event_out,
int *which_eq_out);
/** @} lnet_eq */
/** \defgroup lnet_data Data movement operations
*
* The LNet API provides two data movement operations: LNetPut()
* and LNetGet().
* @{
*/
int LNetPut(lnet_nid_t self,
struct lnet_handle_md md_in,
enum lnet_ack_req ack_req_in,
struct lnet_process_id target_in,
unsigned int portal_in,
__u64 match_bits_in,
unsigned int offset_in,
__u64 hdr_data_in);
int LNetGet(lnet_nid_t self,
struct lnet_handle_md md_in,
struct lnet_process_id target_in,
unsigned int portal_in,
__u64 match_bits_in,
unsigned int offset_in);
/** @} lnet_data */
/** \defgroup lnet_misc Miscellaneous operations.
* Miscellaneous operations.
* @{
*/
int LNetSetLazyPortal(int portal);
int LNetClearLazyPortal(int portal);
int LNetCtl(unsigned int cmd, void *arg);
void LNetDebugPeer(struct lnet_process_id id);
/** @} lnet_misc */
/** @} lnet */
#endif
This diff is collapsed.
This diff is collapsed.
// SPDX-License-Identifier: GPL-2.0
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2012 - 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Seagate, Inc.
*
* lnet/include/lnet/socklnd.h
*/
#ifndef __LNET_LNET_SOCKLND_H__
#define __LNET_LNET_SOCKLND_H__
#include <uapi/linux/lnet/lnet-types.h>
#include <uapi/linux/lnet/socklnd.h>
struct ksock_hello_msg {
__u32 kshm_magic; /* magic number of socklnd message */
__u32 kshm_version; /* version of socklnd message */
lnet_nid_t kshm_src_nid; /* sender's nid */
lnet_nid_t kshm_dst_nid; /* destination nid */
lnet_pid_t kshm_src_pid; /* sender's pid */
lnet_pid_t kshm_dst_pid; /* destination pid */
__u64 kshm_src_incarnation; /* sender's incarnation */
__u64 kshm_dst_incarnation; /* destination's incarnation */
__u32 kshm_ctype; /* connection type */
__u32 kshm_nips; /* # IP addrs */
__u32 kshm_ips[0]; /* IP addrs */
} WIRE_ATTR;
struct ksock_lnet_msg {
struct lnet_hdr ksnm_hdr; /* lnet hdr */
/*
* ksnm_payload is removed because of winnt compiler's limitation:
* zero-sized array can only be placed at the tail of [nested]
* structure definitions. lnet payload will be stored just after
* the body of structure ksock_lnet_msg_t
*/
} WIRE_ATTR;
struct ksock_msg {
__u32 ksm_type; /* type of socklnd message */
__u32 ksm_csum; /* checksum if != 0 */
__u64 ksm_zc_cookies[2]; /* Zero-Copy request/ACK cookie */
union {
struct ksock_lnet_msg lnetmsg; /* lnet message, it's empty if
* it's NOOP
*/
} WIRE_ATTR ksm_u;
} WIRE_ATTR;
#define KSOCK_MSG_NOOP 0xC0 /* ksm_u empty */
#define KSOCK_MSG_LNET 0xC1 /* lnet msg */
/*
* We need to know this number to parse hello msg from ksocklnd in
* other LND (usocklnd, for example)
*/
#define KSOCK_PROTO_V2 2
#define KSOCK_PROTO_V3 3
#endif
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2012, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
* libcfs/include/libcfs/libcfs_debug.h
*
* Debug messages and assertions
*
*/
#ifndef __UAPI_LIBCFS_DEBUG_H__
#define __UAPI_LIBCFS_DEBUG_H__
/**
* Format for debug message headers
*/
struct ptldebug_header {
__u32 ph_len;
__u32 ph_flags;
__u32 ph_subsys;
__u32 ph_mask;
__u16 ph_cpu_id;
__u16 ph_type;
/* time_t overflow in 2106 */
__u32 ph_sec;
__u64 ph_usec;
__u32 ph_stack;
__u32 ph_pid;
__u32 ph_extern_pid;
__u32 ph_line_num;
} __attribute__((packed));
#define PH_FLAG_FIRST_RECORD 1
/* Debugging subsystems (32 bits, non-overlapping) */
#define S_UNDEFINED 0x00000001
#define S_MDC 0x00000002
#define S_MDS 0x00000004
#define S_OSC 0x00000008
#define S_OST 0x00000010
#define S_CLASS 0x00000020
#define S_LOG 0x00000040
#define S_LLITE 0x00000080
#define S_RPC 0x00000100
#define S_MGMT 0x00000200
#define S_LNET 0x00000400
#define S_LND 0x00000800 /* ALL LNDs */
#define S_PINGER 0x00001000
#define S_FILTER 0x00002000
#define S_LIBCFS 0x00004000
#define S_ECHO 0x00008000
#define S_LDLM 0x00010000
#define S_LOV 0x00020000
#define S_LQUOTA 0x00040000
#define S_OSD 0x00080000
#define S_LFSCK 0x00100000
#define S_SNAPSHOT 0x00200000
/* unused */
#define S_LMV 0x00800000 /* b_new_cmd */
/* unused */
#define S_SEC 0x02000000 /* upcall cache */
#define S_GSS 0x04000000 /* b_new_cmd */
/* unused */
#define S_MGC 0x10000000
#define S_MGS 0x20000000
#define S_FID 0x40000000 /* b_new_cmd */
#define S_FLD 0x80000000 /* b_new_cmd */
#define LIBCFS_DEBUG_SUBSYS_NAMES { \
"undefined", "mdc", "mds", "osc", "ost", "class", "log", \
"llite", "rpc", "mgmt", "lnet", "lnd", "pinger", "filter", \
"libcfs", "echo", "ldlm", "lov", "lquota", "osd", "lfsck", \
"snapshot", "", "lmv", "", "sec", "gss", "", "mgc", "mgs", \
"fid", "fld", NULL }
/* Debugging masks (32 bits, non-overlapping) */
#define D_TRACE 0x00000001 /* ENTRY/EXIT markers */
#define D_INODE 0x00000002
#define D_SUPER 0x00000004
#define D_EXT2 0x00000008 /* anything from ext2_debug */
#define D_MALLOC 0x00000010 /* print malloc, free information */
#define D_CACHE 0x00000020 /* cache-related items */
#define D_INFO 0x00000040 /* general information */
#define D_IOCTL 0x00000080 /* ioctl related information */
#define D_NETERROR 0x00000100 /* network errors */
#define D_NET 0x00000200 /* network communications */
#define D_WARNING 0x00000400 /* CWARN(...) == CDEBUG (D_WARNING, ...) */
#define D_BUFFS 0x00000800
#define D_OTHER 0x00001000
#define D_DENTRY 0x00002000
#define D_NETTRACE 0x00004000
#define D_PAGE 0x00008000 /* bulk page handling */
#define D_DLMTRACE 0x00010000
#define D_ERROR 0x00020000 /* CERROR(...) == CDEBUG (D_ERROR, ...) */
#define D_EMERG 0x00040000 /* CEMERG(...) == CDEBUG (D_EMERG, ...) */
#define D_HA 0x00080000 /* recovery and failover */
#define D_RPCTRACE 0x00100000 /* for distributed debugging */
#define D_VFSTRACE 0x00200000
#define D_READA 0x00400000 /* read-ahead */
#define D_MMAP 0x00800000
#define D_CONFIG 0x01000000
#define D_CONSOLE 0x02000000
#define D_QUOTA 0x04000000
#define D_SEC 0x08000000
#define D_LFSCK 0x10000000 /* For both OI scrub and LFSCK */
#define D_HSM 0x20000000
#define D_SNAPSHOT 0x40000000 /* snapshot */
#define D_LAYOUT 0x80000000
#define LIBCFS_DEBUG_MASKS_NAMES { \
"trace", "inode", "super", "ext2", "malloc", "cache", "info", \
"ioctl", "neterror", "net", "warning", "buffs", "other", \
"dentry", "nettrace", "page", "dlmtrace", "error", "emerg", \
"ha", "rpctrace", "vfstrace", "reada", "mmap", "config", \
"console", "quota", "sec", "lfsck", "hsm", "snapshot", "layout",\
NULL }
#define D_CANTMASK (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE)
#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
#endif /* __UAPI_LIBCFS_DEBUG_H__ */
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
* libcfs/include/libcfs/libcfs_ioctl.h
*
* Low-level ioctl data structures. Kernel ioctl functions declared here,
* and user space functions are in libcfs/util/ioctl.h.
*
*/
#ifndef __LIBCFS_IOCTL_H__
#define __LIBCFS_IOCTL_H__
#include <linux/types.h>
#include <linux/ioctl.h>
#define LIBCFS_IOCTL_VERSION 0x0001000a
#define LIBCFS_IOCTL_VERSION2 0x0001000b
struct libcfs_ioctl_hdr {
__u32 ioc_len;
__u32 ioc_version;
};
/** max size to copy from userspace */
#define LIBCFS_IOC_DATA_MAX (128 * 1024)
struct libcfs_ioctl_data {
struct libcfs_ioctl_hdr ioc_hdr;
__u64 ioc_nid;
__u64 ioc_u64[1];
__u32 ioc_flags;
__u32 ioc_count;
__u32 ioc_net;
__u32 ioc_u32[7];
__u32 ioc_inllen1;
char *ioc_inlbuf1;
__u32 ioc_inllen2;
char *ioc_inlbuf2;
__u32 ioc_plen1; /* buffers in userspace */
void __user *ioc_pbuf1;
__u32 ioc_plen2; /* buffers in userspace */
void __user *ioc_pbuf2;
char ioc_bulk[0];
};
struct libcfs_debug_ioctl_data {
struct libcfs_ioctl_hdr hdr;
unsigned int subs;
unsigned int debug;
};
/* 'f' ioctls are defined in lustre_ioctl.h and lustre_user.h except for: */
#define LIBCFS_IOC_DEBUG_MASK _IOWR('f', 250, long)
#define IOCTL_LIBCFS_TYPE long
#define IOC_LIBCFS_TYPE ('e')
#define IOC_LIBCFS_MIN_NR 30
/* libcfs ioctls */
/* IOC_LIBCFS_PANIC obsolete in 2.8.0, was _IOWR('e', 30, IOCTL_LIBCFS_TYPE) */
#define IOC_LIBCFS_CLEAR_DEBUG _IOWR('e', 31, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_MARK_DEBUG _IOWR('e', 32, IOCTL_LIBCFS_TYPE)
/* IOC_LIBCFS_MEMHOG obsolete in 2.8.0, was _IOWR('e', 36, IOCTL_LIBCFS_TYPE) */
/* lnet ioctls */
#define IOC_LIBCFS_GET_NI _IOWR('e', 50, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_FAIL_NID _IOWR('e', 51, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_NOTIFY_ROUTER _IOWR('e', 55, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_UNCONFIGURE _IOWR('e', 56, IOCTL_LIBCFS_TYPE)
/* IOC_LIBCFS_PORTALS_COMPATIBILITY _IOWR('e', 57, IOCTL_LIBCFS_TYPE) */
#define IOC_LIBCFS_LNET_DIST _IOWR('e', 58, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_CONFIGURE _IOWR('e', 59, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_TESTPROTOCOMPAT _IOWR('e', 60, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_PING _IOWR('e', 61, IOCTL_LIBCFS_TYPE)
/* IOC_LIBCFS_DEBUG_PEER _IOWR('e', 62, IOCTL_LIBCFS_TYPE) */
#define IOC_LIBCFS_LNETST _IOWR('e', 63, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_LNET_FAULT _IOWR('e', 64, IOCTL_LIBCFS_TYPE)
/* lnd ioctls */
#define IOC_LIBCFS_REGISTER_MYNID _IOWR('e', 70, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_CLOSE_CONNECTION _IOWR('e', 71, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_PUSH_CONNECTION _IOWR('e', 72, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_GET_CONN _IOWR('e', 73, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_DEL_PEER _IOWR('e', 74, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_ADD_PEER _IOWR('e', 75, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_GET_PEER _IOWR('e', 76, IOCTL_LIBCFS_TYPE)
/* ioctl 77 is free for use */
#define IOC_LIBCFS_ADD_INTERFACE _IOWR('e', 78, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_DEL_INTERFACE _IOWR('e', 79, IOCTL_LIBCFS_TYPE)
#define IOC_LIBCFS_GET_INTERFACE _IOWR('e', 80, IOCTL_LIBCFS_TYPE)
/*
* DLC Specific IOCTL numbers.
* In order to maintain backward compatibility with any possible external
* tools which might be accessing the IOCTL numbers, a new group of IOCTL
* number have been allocated.
*/
#define IOCTL_CONFIG_SIZE struct lnet_ioctl_config_data
#define IOC_LIBCFS_ADD_ROUTE _IOWR(IOC_LIBCFS_TYPE, 81, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_DEL_ROUTE _IOWR(IOC_LIBCFS_TYPE, 82, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_GET_ROUTE _IOWR(IOC_LIBCFS_TYPE, 83, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_ADD_NET _IOWR(IOC_LIBCFS_TYPE, 84, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_DEL_NET _IOWR(IOC_LIBCFS_TYPE, 85, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_GET_NET _IOWR(IOC_LIBCFS_TYPE, 86, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_CONFIG_RTR _IOWR(IOC_LIBCFS_TYPE, 87, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_ADD_BUF _IOWR(IOC_LIBCFS_TYPE, 88, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_GET_BUF _IOWR(IOC_LIBCFS_TYPE, 89, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_GET_PEER_INFO _IOWR(IOC_LIBCFS_TYPE, 90, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_GET_LNET_STATS _IOWR(IOC_LIBCFS_TYPE, 91, IOCTL_CONFIG_SIZE)
#define IOC_LIBCFS_MAX_NR 91
#endif /* __LIBCFS_IOCTL_H__ */
/*
* LGPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*
* LGPL HEADER END
*
*/
/*
* Copyright (c) 2014, Intel Corporation.
*/
/*
* Author: Amir Shehata <amir.shehata@intel.com>
*/
#ifndef LNET_DLC_H
#define LNET_DLC_H
#include <uapi/linux/lnet/libcfs_ioctl.h>
#include <uapi/linux/lnet/lnet-types.h>
#define MAX_NUM_SHOW_ENTRIES 32
#define LNET_MAX_STR_LEN 128
#define LNET_MAX_SHOW_NUM_CPT 128
#define LNET_UNDEFINED_HOPS ((__u32)(-1))
struct lnet_ioctl_config_lnd_cmn_tunables {
__u32 lct_version;
__u32 lct_peer_timeout;
__u32 lct_peer_tx_credits;
__u32 lct_peer_rtr_credits;
__u32 lct_max_tx_credits;
};
struct lnet_ioctl_config_o2iblnd_tunables {
__u32 lnd_version;
__u32 lnd_peercredits_hiw;
__u32 lnd_map_on_demand;
__u32 lnd_concurrent_sends;
__u32 lnd_fmr_pool_size;
__u32 lnd_fmr_flush_trigger;
__u32 lnd_fmr_cache;
__u16 lnd_conns_per_peer;
__u16 pad;
};
struct lnet_ioctl_config_lnd_tunables {
struct lnet_ioctl_config_lnd_cmn_tunables lt_cmn;
union {
struct lnet_ioctl_config_o2iblnd_tunables lt_o2ib;
} lt_tun_u;
};
struct lnet_ioctl_net_config {
char ni_interfaces[LNET_MAX_INTERFACES][LNET_MAX_STR_LEN];
__u32 ni_status;
__u32 ni_cpts[LNET_MAX_SHOW_NUM_CPT];
char cfg_bulk[0];
};
#define LNET_TINY_BUF_IDX 0
#define LNET_SMALL_BUF_IDX 1
#define LNET_LARGE_BUF_IDX 2
/* # different router buffer pools */
#define LNET_NRBPOOLS (LNET_LARGE_BUF_IDX + 1)
struct lnet_ioctl_pool_cfg {
struct {
__u32 pl_npages;
__u32 pl_nbuffers;
__u32 pl_credits;
__u32 pl_mincredits;
} pl_pools[LNET_NRBPOOLS];
__u32 pl_routing;
};
struct lnet_ioctl_config_data {
struct libcfs_ioctl_hdr cfg_hdr;
__u32 cfg_net;
__u32 cfg_count;
__u64 cfg_nid;
__u32 cfg_ncpts;
union {
struct {
__u32 rtr_hop;
__u32 rtr_priority;
__u32 rtr_flags;
} cfg_route;
struct {
char net_intf[LNET_MAX_STR_LEN];
__s32 net_peer_timeout;
__s32 net_peer_tx_credits;
__s32 net_peer_rtr_credits;
__s32 net_max_tx_credits;
__u32 net_cksum_algo;
__u32 net_interface_count;
} cfg_net;
struct {
__u32 buf_enable;
__s32 buf_tiny;
__s32 buf_small;
__s32 buf_large;
} cfg_buffers;
} cfg_config_u;
char cfg_bulk[0];
};
struct lnet_ioctl_peer {
struct libcfs_ioctl_hdr pr_hdr;
__u32 pr_count;
__u32 pr_pad;
__u64 pr_nid;
union {
struct {
char cr_aliveness[LNET_MAX_STR_LEN];
__u32 cr_refcount;
__u32 cr_ni_peer_tx_credits;
__u32 cr_peer_tx_credits;
__u32 cr_peer_rtr_credits;
__u32 cr_peer_min_rtr_credits;
__u32 cr_peer_tx_qnob;
__u32 cr_ncpt;
} pr_peer_credits;
} pr_lnd_u;
};
struct lnet_ioctl_lnet_stats {
struct libcfs_ioctl_hdr st_hdr;
struct lnet_counters st_cntrs;
};
#endif /* LNET_DLC_H */
/*
* This file is part of Portals, http://www.sf.net/projects/lustre/
*
* Portals is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* Portals is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* header for lnet ioctl
*/
#ifndef _LNETCTL_H_
#define _LNETCTL_H_
#include <uapi/linux/lnet/lnet-types.h>
/** \addtogroup lnet_fault_simulation
* @{
*/
enum {
LNET_CTL_DROP_ADD,
LNET_CTL_DROP_DEL,
LNET_CTL_DROP_RESET,
LNET_CTL_DROP_LIST,
LNET_CTL_DELAY_ADD,
LNET_CTL_DELAY_DEL,
LNET_CTL_DELAY_RESET,
LNET_CTL_DELAY_LIST,
};
#define LNET_ACK_BIT (1 << 0)
#define LNET_PUT_BIT (1 << 1)
#define LNET_GET_BIT (1 << 2)
#define LNET_REPLY_BIT (1 << 3)
/** ioctl parameter for LNet fault simulation */
struct lnet_fault_attr {
/**
* source NID of drop rule
* LNET_NID_ANY is wildcard for all sources
* 255.255.255.255@net is wildcard for all addresses from @net
*/
lnet_nid_t fa_src;
/** destination NID of drop rule, see \a dr_src for details */
lnet_nid_t fa_dst;
/**
* Portal mask to drop, -1 means all portals, for example:
* fa_ptl_mask = (1 << _LDLM_CB_REQUEST_PORTAL ) |
* (1 << LDLM_CANCEL_REQUEST_PORTAL)
*
* If it is non-zero then only PUT and GET will be filtered, otherwise
* there is no portal filter, all matched messages will be checked.
*/
__u64 fa_ptl_mask;
/**
* message types to drop, for example:
* dra_type = LNET_DROP_ACK_BIT | LNET_DROP_PUT_BIT
*
* If it is non-zero then only specified message types are filtered,
* otherwise all message types will be checked.
*/
__u32 fa_msg_mask;
union {
/** message drop simulation */
struct {
/** drop rate of this rule */
__u32 da_rate;
/**
* time interval of message drop, it is exclusive
* with da_rate
*/
__u32 da_interval;
} drop;
/** message latency simulation */
struct {
__u32 la_rate;
/**
* time interval of message delay, it is exclusive
* with la_rate
*/
__u32 la_interval;
/** latency to delay */
__u32 la_latency;
} delay;
__u64 space[8];
} u;
};
/** fault simluation stats */
struct lnet_fault_stat {
/** total # matched messages */
__u64 fs_count;
/** # dropped LNET_MSG_PUT by this rule */
__u64 fs_put;
/** # dropped LNET_MSG_ACK by this rule */
__u64 fs_ack;
/** # dropped LNET_MSG_GET by this rule */
__u64 fs_get;
/** # dropped LNET_MSG_REPLY by this rule */
__u64 fs_reply;
union {
struct {
/** total # dropped messages */
__u64 ds_dropped;
} drop;
struct {
/** total # delayed messages */
__u64 ls_delayed;
} delay;
__u64 space[8];
} u;
};
/** @} lnet_fault_simulation */
#define LNET_DEV_ID 0
#define LNET_DEV_PATH "/dev/lnet"
#endif
/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is included
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
* http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
* #defines shared between socknal implementation and utilities
*/
#ifndef __UAPI_LNET_SOCKLND_H__
#define __UAPI_LNET_SOCKLND_H__
#define SOCKLND_CONN_NONE (-1)
#define SOCKLND_CONN_ANY 0
#define SOCKLND_CONN_CONTROL 1
#define SOCKLND_CONN_BULK_IN 2
#define SOCKLND_CONN_BULK_OUT 3
#define SOCKLND_CONN_NTYPES 4
#define SOCKLND_CONN_ACK SOCKLND_CONN_BULK_IN
#endif
#ifndef _LUSTRE_VER_H_
#define _LUSTRE_VER_H_
#define LUSTRE_MAJOR 2
#define LUSTRE_MINOR 6
#define LUSTRE_PATCH 99
#define LUSTRE_FIX 0
#define LUSTRE_VERSION_STRING "2.6.99"
#define OBD_OCD_VERSION(major, minor, patch, fix) \
(((major) << 24) + ((minor) << 16) + ((patch) << 8) + (fix))
#define OBD_OCD_VERSION_MAJOR(version) ((int)((version) >> 24) & 255)
#define OBD_OCD_VERSION_MINOR(version) ((int)((version) >> 16) & 255)
#define OBD_OCD_VERSION_PATCH(version) ((int)((version) >> 8) & 255)
#define OBD_OCD_VERSION_FIX(version) ((int)((version) >> 0) & 255)
#define LUSTRE_VERSION_CODE \
OBD_OCD_VERSION(LUSTRE_MAJOR, LUSTRE_MINOR, LUSTRE_PATCH, LUSTRE_FIX)
/*
* If lustre version of client and servers it connects to differs by more
* than this amount, client would issue a warning.
*/
#define LUSTRE_VERSION_OFFSET_WARN OBD_OCD_VERSION(0, 4, 0, 0)
#endif
This diff is collapsed.
obj-$(CONFIG_LNET) += libcfs/ lnet/ klnds/ selftest/
obj-$(CONFIG_LNET) += o2iblnd/ socklnd/
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
obj-$(CONFIG_LNET_XPRT_IB) += ko2iblnd.o
ko2iblnd-y := o2iblnd.o o2iblnd_cb.o o2iblnd_modparams.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
obj-$(CONFIG_LNET) += ksocklnd.o
ksocklnd-y := socklnd.o socklnd_cb.o socklnd_proto.o socklnd_modparams.o socklnd_lib.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# SPDX-License-Identifier: GPL-2.0
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
obj-$(CONFIG_LNET) += libcfs.o
libcfs-obj-y += linux-tracefile.o linux-debug.o
libcfs-obj-y += linux-crypto.o
libcfs-obj-y += linux-crypto-adler.o
libcfs-obj-y += debug.o fail.o module.o tracefile.o
libcfs-obj-y += libcfs_string.o hash.o
libcfs-obj-$(CONFIG_SMP) += libcfs_cpu.o
libcfs-obj-y += libcfs_mem.o libcfs_lock.o
libcfs-objs := $(libcfs-obj-y)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# SPDX-License-Identifier: GPL-2.0
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
obj-$(CONFIG_LNET) += lnet.o
lnet-y := api-ni.o config.o nidstrings.o net_fault.o \
lib-me.o lib-msg.o lib-eq.o lib-md.o lib-ptl.o \
lib-socket.o lib-move.o module.o lo.o \
router.o router_proc.o acceptor.o peer.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment