tgt->cookie = src->cookie;
}
-struct lustre_handle_array {
- unsigned int count;
- struct lustre_handle handles[0];
-};
-
/* lustre_msg struct magic. DON'T use swabbed values of MAGIC as magic! */
enum lustre_msg_magic {
LUSTRE_MSG_MAGIC_V2 = 0x0BD00BD3,
__u64 pb_padding64_0;
__u64 pb_padding64_1;
__u64 pb_padding64_2;
- char pb_jobid[LUSTRE_JOBID_SIZE]; /* req: ASCII MPI jobid from env */
+ char pb_jobid[LUSTRE_JOBID_SIZE]; /* req: ASCII jobid from env + NUL */
};
#define ptlrpc_body ptlrpc_body_v3
#define OBD_CONNECT_OBDOPACK 0x4000000000000000ULL /* compact OUT obdo */
#define OBD_CONNECT_FLAGS2 0x8000000000000000ULL /* second flags word */
/* ocd_connect_flags2 flags */
-#define OBD_CONNECT2_FILE_SECCTX 0x1ULL /* set file security context at create */
-#define OBD_CONNECT2_LOCKAHEAD 0x2ULL /* ladvise lockahead v2 */
-#define OBD_CONNECT2_FLR 0x20ULL /* FLR support */
+#define OBD_CONNECT2_FILE_SECCTX 0x1ULL /* set file security context at create */
+#define OBD_CONNECT2_LOCKAHEAD 0x2ULL /* ladvise lockahead v2 */
+#define OBD_CONNECT2_DIR_MIGRATE 0x4ULL /* migrate striped dir */
+#define OBD_CONNECT2_FLR 0x20ULL /* FLR support */
+#define OBD_CONNECT2_WBC_INTENTS 0x40ULL /* create/unlink/... intents for wbc, also operations under client-held parent locks */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same
#define OST_CONNECT_SUPPORTED2 OBD_CONNECT2_LOCKAHEAD
-#define ECHO_CONNECT_SUPPORTED 0
+#define ECHO_CONNECT_SUPPORTED (OBD_CONNECT_FID)
#define ECHO_CONNECT_SUPPORTED2 0
#define MGS_CONNECT_SUPPORTED (OBD_CONNECT_VERSION | OBD_CONNECT_AT | \
* Please update DECLARE_CKSUM_NAME/OBD_CKSUM_ALL in obd.h when adding a new
* algorithm and also the OBD_FL_CKSUM* flags.
*/
-typedef enum cksum_types {
+enum cksum_types {
OBD_CKSUM_CRC32 = 0x00000001,
OBD_CKSUM_ADLER = 0x00000002,
OBD_CKSUM_CRC32C= 0x00000004,
-} cksum_type_t;
+};
/*
* OST requests: OBDO & OBD request records
*/
/* opcodes */
-typedef enum {
+enum ost_cmd {
OST_REPLY = 0, /* reply ? */
OST_GETATTR = 1,
OST_SETATTR = 2,
OST_QUOTA_ADJUST_QUNIT = 20, /* not used since 2.4 */
OST_LADVISE = 21,
OST_LAST_OPC /* must be < 33 to avoid MDS_GETATTR */
-} ost_cmd_t;
+};
#define OST_FIRST_OPC OST_REPLY
enum obdo_flags {
/* OBD_MD_FLRMTPERM (0x0000010000000000ULL) remote perm, obsolete */
#define OBD_MD_FLMDSCAPA (0x0000020000000000ULL) /* MDS capability */
#define OBD_MD_FLOSSCAPA (0x0000040000000000ULL) /* OSS capability */
-#define OBD_MD_FLCKSPLIT (0x0000080000000000ULL) /* Check split on server */
+/* OBD_MD_FLCKSPLIT (0x0000080000000000ULL) obsolete 2.3.58*/
#define OBD_MD_FLCROSSREF (0x0000100000000000ULL) /* Cross-ref case */
#define OBD_MD_FLGETATTRLOCK (0x0000200000000000ULL) /* Get IOEpoch attributes
* under lock; for xattr
#define OBD_BRW_LOCALS (OBD_BRW_LOCAL1)
+#define OBD_MAX_GRANT 0x7fffffffUL /* Max grant allowed to one client: 2 GiB */
+
#define OBD_OBJECT_EOF LUSTRE_EOF
#define OST_MIN_PRECREATE 32
#define lvb_glb_ver lvb_id_may_rel /* current version of the global index */
/* op codes */
-typedef enum {
+enum quota_cmd {
QUOTA_DQACQ = 601,
QUOTA_DQREL = 602,
QUOTA_LAST_OPC
-} quota_cmd_t;
+};
#define QUOTA_FIRST_OPC QUOTA_DQACQ
/*
*/
/* opcodes */
-typedef enum {
+enum mds_cmd {
MDS_GETATTR = 33,
MDS_GETATTR_NAME = 34,
MDS_CLOSE = 35,
MDS_HSM_CT_UNREGISTER = 60,
MDS_SWAP_LAYOUTS = 61,
MDS_LAST_OPC
-} mds_cmd_t;
+};
#define MDS_FIRST_OPC MDS_GETATTR
/* opcodes for object update */
-typedef enum {
+enum update_cmd {
OUT_UPDATE = 1000,
OUT_UPDATE_LAST_OPC
-} update_cmd_t;
+};
#define OUT_UPDATE_FIRST_OPC OUT_UPDATE
__s64 mbo_atime;
__s64 mbo_ctime;
__u64 mbo_blocks; /* XID, in the case of MDS_READPAGE */
- __u64 mbo_ioepoch;
+ __u64 mbo_version; /* was mbo_ioepoch before 2.11 */
__u64 mbo_t_state; /* transient file state defined in
* enum md_transient_state
* was "ino" until 2.4.0 */
__u32 mbo_flags; /* LUSTRE_*_FL file attributes */
__u32 mbo_rdev;
__u32 mbo_nlink; /* #bytes to read in the case of MDS_READPAGE */
- __u32 mbo_unused2; /* was "generation" until 2.4.0 */
+ __u32 mbo_layout_gen; /* was "generation" until 2.4.0 */
__u32 mbo_suppgid;
__u32 mbo_eadatasize;
__u32 mbo_aclsize;
#define MDS_ATTR_PROJID 0x10000ULL /* = 65536 */
enum mds_op_bias {
- MDS_CHECK_SPLIT = 1 << 0,
+/* MDS_CHECK_SPLIT = 1 << 0, obsolete before 2.3.58 */
MDS_CROSS_REF = 1 << 1,
- MDS_VTX_BYPASS = 1 << 2,
+/* MDS_VTX_BYPASS = 1 << 2, obsolete since 2.3.54 */
MDS_PERM_BYPASS = 1 << 3,
/* MDS_SOM = 1 << 4, obsolete since 2.8.0 */
MDS_QUOTA_IGNORE = 1 << 5,
- /* Was MDS_CLOSE_CLEANUP (1 << 6), No more used */
+/* MDS_CLOSE_CLEANUP = 1 << 6, obsolete since 2.3.51 */
MDS_KEEP_ORPHAN = 1 << 7,
MDS_RECOV_OPEN = 1 << 8,
MDS_DATA_MODIFIED = 1 << 9,
};
/* LFSCK opcodes */
-typedef enum {
+enum lfsck_cmd {
LFSCK_NOTIFY = 1101,
LFSCK_QUERY = 1102,
LFSCK_LAST_OPC,
- LFSCK_FIRST_OPC = LFSCK_NOTIFY
-} lfsck_cmd_t;
+ LFSCK_FIRST_OPC = LFSCK_NOTIFY
+};
/*
* LOV data structures
* LDLM requests:
*/
/* opcodes -- MUST be distinct from OST/MDS opcodes */
-typedef enum {
+enum ldlm_cmd {
LDLM_ENQUEUE = 101,
LDLM_CONVERT = 102,
LDLM_CANCEL = 103,
LDLM_GL_CALLBACK = 106,
LDLM_SET_INFO = 107,
LDLM_LAST_OPC
-} ldlm_cmd_t;
+};
#define LDLM_FIRST_OPC LDLM_ENQUEUE
#define RES_NAME_SIZE 4
(unsigned long long)(res)->lr_name.name[3]
/* lock types */
-typedef enum ldlm_mode {
+enum ldlm_mode {
LCK_MINMODE = 0,
LCK_EX = 1,
LCK_PW = 2,
LCK_GROUP = 64,
LCK_COS = 128,
LCK_MAXMODE
-} ldlm_mode_t;
+};
#define LCK_MODE_NUM 8
-typedef enum ldlm_type {
+enum ldlm_type {
LDLM_PLAIN = 10,
LDLM_EXTENT = 11,
LDLM_FLOCK = 12,
LDLM_IBITS = 13,
LDLM_MAX_TYPE
-} ldlm_type_t;
+};
#define LDLM_MIN_TYPE LDLM_PLAIN
}
struct ldlm_inodebits {
- __u64 bits;
- __u64 try_bits; /* optional bits to try */
+ __u64 bits;
+ union {
+ __u64 try_bits; /* optional bits to try */
+ __u64 cancel_bits; /* for lock convert */
+ };
};
struct ldlm_flock_wire {
* this ever changes we will need to swab the union differently based
* on the resource type. */
-typedef union ldlm_wire_policy_data {
+union ldlm_wire_policy_data {
struct ldlm_extent l_extent;
struct ldlm_flock_wire l_flock;
struct ldlm_inodebits l_inodebits;
-} ldlm_wire_policy_data_t;
+};
struct barrier_lvb {
__u32 lvb_status;
/*
* Opcodes for mountconf (mgs and mgc)
*/
-typedef enum {
+enum mgs_cmd {
MGS_CONNECT = 250,
MGS_DISCONNECT,
MGS_EXCEPTION, /* node died, etc. */
MGS_SET_INFO,
MGS_CONFIG_READ,
MGS_LAST_OPC
-} mgs_cmd_t;
+};
#define MGS_FIRST_OPC MGS_CONNECT
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 13, 53, 0)
/*
* Opcodes for multiple servers.
*/
-
-typedef enum {
- OBD_PING = 400,
- OBD_LOG_CANCEL,
+enum obd_cmd {
+ OBD_PING = 400,
+ OBD_LOG_CANCEL, /* Obsolete since 1.5. */
OBD_QC_CALLBACK, /* not used since 2.4 */
OBD_IDX_READ,
OBD_LAST_OPC
-} obd_cmd_t;
+};
#define OBD_FIRST_OPC OBD_PING
/**
#define LLOG_OP_MAGIC 0x10600000
#define LLOG_OP_MASK 0xfff00000
-typedef enum {
+enum llog_op_type {
LLOG_PAD_MAGIC = LLOG_OP_MAGIC | 0x00000,
OST_SZ_REC = LLOG_OP_MAGIC | 0x00f00,
/* OST_RAID1_REC = LLOG_OP_MAGIC | 0x01000, never used */
UPDATE_REC = LLOG_OP_MAGIC | 0xa0000,
LLOG_HDR_MAGIC = LLOG_OP_MAGIC | 0x45539,
LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b,
-} llog_op_type;
+};
#define LLOG_REC_HDR_NEEDS_SWABBING(r) \
(((r)->lrh_type & __swab32(LLOG_OP_MASK)) == __swab32(LLOG_OP_MAGIC))
* agent_req_status */
__u32 arr_archive_id; /**< backend archive number */
__u64 arr_flags; /**< req flags */
- __u64 arr_compound_id; /**< compound cookie */
+ __u64 arr_compound_id; /**< compound cookie, ignored */
__u64 arr_req_create; /**< req. creation time */
__u64 arr_req_change; /**< req. status change time */
struct hsm_action_item arr_hai; /**< req. to the agent */
/** llog protocol */
enum llogd_rpc_ops {
- LLOG_ORIGIN_HANDLE_CREATE = 501,
- LLOG_ORIGIN_HANDLE_NEXT_BLOCK = 502,
- LLOG_ORIGIN_HANDLE_READ_HEADER = 503,
- LLOG_ORIGIN_HANDLE_WRITE_REC = 504,
- LLOG_ORIGIN_HANDLE_CLOSE = 505,
- LLOG_ORIGIN_CONNECT = 506,
- LLOG_CATINFO = 507, /* deprecated */
- LLOG_ORIGIN_HANDLE_PREV_BLOCK = 508,
- LLOG_ORIGIN_HANDLE_DESTROY = 509, /* for destroy llog object*/
- LLOG_LAST_OPC,
- LLOG_FIRST_OPC = LLOG_ORIGIN_HANDLE_CREATE
+ LLOG_ORIGIN_HANDLE_CREATE = 501,
+ LLOG_ORIGIN_HANDLE_NEXT_BLOCK = 502,
+ LLOG_ORIGIN_HANDLE_READ_HEADER = 503,
+ LLOG_ORIGIN_HANDLE_WRITE_REC = 504, /* Obsolete by 2.1. */
+ LLOG_ORIGIN_HANDLE_CLOSE = 505, /* Obsolete by 1.8. */
+ LLOG_ORIGIN_CONNECT = 506, /* Obsolete by 2.4. */
+ LLOG_CATINFO = 507, /* Obsolete by 2.3. */
+ LLOG_ORIGIN_HANDLE_PREV_BLOCK = 508,
+ LLOG_ORIGIN_HANDLE_DESTROY = 509, /* Obsolete. */
+ LLOG_LAST_OPC,
+ LLOG_FIRST_OPC = LLOG_ORIGIN_HANDLE_CREATE
};
struct llogd_body {
};
/* security opcodes */
-typedef enum {
+enum sec_cmd {
SEC_CTX_INIT = 801,
SEC_CTX_INIT_CONT = 802,
SEC_CTX_FINI = 803,
SEC_LAST_OPC,
SEC_FIRST_OPC = SEC_CTX_INIT
-} sec_cmd_t;
+};
/*
* capa related definitions
OUT_PUNCH = 14,
OUT_READ = 15,
OUT_NOOP = 16,
+ OUT_XATTR_LIST = 17,
OUT_LAST
};