struct lu_orphan_rec_v2 loe_rec;
};
+struct lu_orphan_rec_v3 {
+ struct lu_orphan_rec lor_rec;
+ struct ost_layout lor_layout;
+ /* The OST-object declared layout version in PFID EA.*/
+ __u32 lor_layout_version;
+ /* The OST-object declared layout range (of version) in PFID EA.*/
+ __u32 lor_range;
+ __u32 lor_padding_1;
+ __u64 lor_padding_2;
+};
+
+struct lu_orphan_ent_v3 {
+ /* The orphan OST-object's FID */
+ struct lu_fid loe_key;
+ struct lu_orphan_rec_v3 loe_rec;
+};
+
/** @} lu_fid */
/** \defgroup lu_dir lu_dir
#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 */
+#define OBD_CONNECT2_LOCK_CONVERT 0x80ULL /* IBITS lock convert support */
+#define OBD_CONNECT2_ARCHIVE_ID_ARRAY 0x100ULL /* store HSM archive_id in array */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same
OBD_CONNECT_GRANT_PARAM | \
OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2)
-#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | OBD_CONNECT2_FLR)
+#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | OBD_CONNECT2_FLR | \
++ OBD_CONNECT2_LOCK_CONVERT)
#define OST_CONNECT_SUPPORTED (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \
OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \
/*
* Supported checksum algorithms. Up to 32 checksum types are supported.
* (32-bit mask stored in obd_connect_data::ocd_cksum_types)
- * Please update DECLARE_CKSUM_NAME/OBD_CKSUM_ALL in obd.h when adding a new
- * algorithm and also the OBD_FL_CKSUM* flags.
+ * Please update DECLARE_CKSUM_NAME in obd_cksum.h when adding a new
+ * algorithm and also the OBD_FL_CKSUM* flags, OBD_CKSUM_ALL flag,
+ * OBD_FL_CKSUM_ALL flag and potentially OBD_CKSUM_T10_ALL flag.
*/
enum cksum_types {
- OBD_CKSUM_CRC32 = 0x00000001,
- OBD_CKSUM_ADLER = 0x00000002,
- OBD_CKSUM_CRC32C= 0x00000004,
+ OBD_CKSUM_CRC32 = 0x00000001,
+ OBD_CKSUM_ADLER = 0x00000002,
+ OBD_CKSUM_CRC32C = 0x00000004,
+ OBD_CKSUM_RESERVED = 0x00000008,
+ OBD_CKSUM_T10IP512 = 0x00000010,
+ OBD_CKSUM_T10IP4K = 0x00000020,
+ OBD_CKSUM_T10CRC512 = 0x00000040,
+ OBD_CKSUM_T10CRC4K = 0x00000080,
};
+#define OBD_CKSUM_T10_ALL (OBD_CKSUM_T10IP512 | OBD_CKSUM_T10IP4K | \
+ OBD_CKSUM_T10CRC512 | OBD_CKSUM_T10CRC4K)
+
+#define OBD_CKSUM_ALL (OBD_CKSUM_CRC32 | OBD_CKSUM_ADLER | OBD_CKSUM_CRC32C | \
+ OBD_CKSUM_T10_ALL)
+
+/*
+ * The default checksum algorithm used on top of T10PI GRD tags for RPC.
+ * Considering that the checksum-of-checksums is only computing CRC32 on a
+ * 4KB chunk of GRD tags for a 1MB RPC for 512B sectors, or 16KB of GRD
+ * tags for 16MB of 4KB sectors, this is only 1/256 or 1/1024 of the
+ * total data being checksummed, so the checksum type used here should not
+ * affect overall system performance noticeably.
+ */
+#define OBD_CKSUM_T10_TOP OBD_CKSUM_ADLER
+
/*
* OST requests: OBDO & OBD request records
*/
OBD_FL_NO_GRPQUOTA = 0x00000200, /* the object's group is over quota */
OBD_FL_CREATE_CROW = 0x00000400, /* object should be create on write */
OBD_FL_SRVLOCK = 0x00000800, /* delegate DLM locking to server */
- OBD_FL_CKSUM_CRC32 = 0x00001000, /* CRC32 checksum type */
- OBD_FL_CKSUM_ADLER = 0x00002000, /* ADLER checksum type */
- OBD_FL_CKSUM_CRC32C = 0x00004000, /* CRC32C checksum type */
- OBD_FL_CKSUM_RSVD2 = 0x00008000, /* for future cksum types */
- OBD_FL_CKSUM_RSVD3 = 0x00010000, /* for future cksum types */
- OBD_FL_SHRINK_GRANT = 0x00020000, /* object shrink the grant */
- OBD_FL_MMAP = 0x00040000, /* object is mmapped on the client.
+ OBD_FL_CKSUM_CRC32 = 0x00001000, /* CRC32 checksum type */
+ OBD_FL_CKSUM_ADLER = 0x00002000, /* ADLER checksum type */
+ OBD_FL_CKSUM_CRC32C = 0x00004000, /* CRC32C checksum type */
+ OBD_FL_CKSUM_T10IP512 = 0x00005000, /* T10PI IP cksum, 512B sector */
+ OBD_FL_CKSUM_T10IP4K = 0x00006000, /* T10PI IP cksum, 4KB sector */
+ OBD_FL_CKSUM_T10CRC512 = 0x00007000, /* T10PI CRC cksum, 512B sector */
+ OBD_FL_CKSUM_T10CRC4K = 0x00008000, /* T10PI CRC cksum, 4KB sector */
+ OBD_FL_CKSUM_RSVD3 = 0x00010000, /* for future cksum types */
+ OBD_FL_SHRINK_GRANT = 0x00020000, /* object shrink the grant */
+ OBD_FL_MMAP = 0x00040000, /* object is mmapped on the client.
* XXX: obsoleted - reserved for old
* clients prior than 2.2 */
OBD_FL_RECOV_RESEND = 0x00080000, /* recoverable resent */
OBD_FL_SHORT_IO = 0x00400000, /* short io request */
/* OBD_FL_LOCAL_MASK = 0xF0000000, was local-only flags until 2.10 */
- /* Note that while these checksum values are currently separate bits,
- * in 2.x we can actually allow all values from 1-31 if we wanted. */
+ /*
+ * Note that while the original checksum values were separate bits,
+ * in 2.x we can actually allow all values from 1-31. T10-PI checksum
+ * types already use values which are not separate bits.
+ */
OBD_FL_CKSUM_ALL = OBD_FL_CKSUM_CRC32 | OBD_FL_CKSUM_ADLER |
- OBD_FL_CKSUM_CRC32C,
+ OBD_FL_CKSUM_CRC32C | OBD_FL_CKSUM_T10IP512 |
+ OBD_FL_CKSUM_T10IP4K | OBD_FL_CKSUM_T10CRC512 |
+ OBD_FL_CKSUM_T10CRC4K,
};
/*
#define MDS_ATTR_FROM_OPEN 0x4000ULL /* = 16384, called from open path, ie O_TRUNC */
#define MDS_ATTR_BLOCKS 0x8000ULL /* = 32768 */
#define MDS_ATTR_PROJID 0x10000ULL /* = 65536 */
+#define MDS_ATTR_LSIZE 0x20000ULL /* = 131072 */
+#define MDS_ATTR_LBLOCKS 0x40000ULL /* = 262144 */
enum mds_op_bias {
/* MDS_CHECK_SPLIT = 1 << 0, obsolete before 2.3.58 */
MDS_CREATE_VOLATILE = 1 << 10,
MDS_OWNEROVERRIDE = 1 << 11,
MDS_HSM_RELEASE = 1 << 12,
- MDS_RENAME_MIGRATE = 1 << 13,
+ MDS_CLOSE_MIGRATE = 1 << 13,
MDS_CLOSE_LAYOUT_SWAP = 1 << 14,
MDS_CLOSE_LAYOUT_MERGE = 1 << 15,
MDS_CLOSE_RESYNC_DONE = 1 << 16,
enum ldlm_intent_flags {
IT_OPEN = 0x00000001,
IT_CREAT = 0x00000002,
- IT_OPEN_CREAT = 0x00000003,
- IT_READDIR = 0x00000004,
+ IT_OPEN_CREAT = IT_OPEN | IT_CREAT, /* To allow case label. */
+ IT_READDIR = 0x00000004, /* Used by mdc, not put on the wire. */
IT_GETATTR = 0x00000008,
IT_LOOKUP = 0x00000010,
- IT_UNLINK = 0x00000020,
- IT_TRUNC = 0x00000040,
+/* IT_UNLINK = 0x00000020, Obsolete. */
+/* IT_TRUNC = 0x00000040, Obsolete. */
IT_GETXATTR = 0x00000080,
- IT_EXEC = 0x00000100,
- IT_PIN = 0x00000200,
+/* IT_EXEC = 0x00000100, Obsolete. */
+/* IT_PIN = 0x00000200, Obsolete. */
IT_LAYOUT = 0x00000400,
IT_QUOTA_DQACQ = 0x00000800,
IT_QUOTA_CONN = 0x00001000,
- IT_SETXATTR = 0x00002000,
+/* IT_SETXATTR = 0x00002000, Obsolete. */
IT_GLIMPSE = 0x00004000,
IT_BRW = 0x00008000,
};
* Opcodes for mountconf (mgs and mgc)
*/
enum mgs_cmd {
- MGS_CONNECT = 250,
- MGS_DISCONNECT,
- MGS_EXCEPTION, /* node died, etc. */
- MGS_TARGET_REG, /* whenever target starts up */
- MGS_TARGET_DEL,
- MGS_SET_INFO,
- MGS_CONFIG_READ,
- MGS_LAST_OPC
+ MGS_CONNECT = 250,
+ MGS_DISCONNECT = 251,
+ MGS_EXCEPTION = 252, /* node died, etc. */
+ MGS_TARGET_REG = 253, /* whenever target starts up */
+ MGS_TARGET_DEL = 254,
+ MGS_SET_INFO = 255,
+ MGS_CONFIG_READ = 256,
+ MGS_LAST_OPC,
+ MGS_FIRST_OPC = MGS_CONNECT
};
-#define MGS_FIRST_OPC MGS_CONNECT
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 13, 53, 0)
#define MGS_PARAM_MAXLEN 1024
* Opcodes for multiple servers.
*/
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_PING = 400,
+/* OBD_LOG_CANCEL = 401, obsolete since 1.5 */
+/* OBD_QC_CALLBACK = 402, obsolete since 2.4 */
+ OBD_IDX_READ = 403,
+ OBD_LAST_OPC,
+ OBD_FIRST_OPC = OBD_PING
};
-#define OBD_FIRST_OPC OBD_PING
/**
* llog contexts indices.
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_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_ORIGIN_HANDLE_DESTROY = 509, /* Obsolete by 2.11. */
LLOG_LAST_OPC,
LLOG_FIRST_OPC = LLOG_ORIGIN_HANDLE_CREATE
};