Whamcloud - gitweb
LU-10499 pcc: introducing OBD_CONNECT2_PCCRO flag
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_idl.h
index 19d2fe3..d9e0f66 100644 (file)
@@ -850,7 +850,10 @@ struct ptlrpc_body_v2 {
 #define OBD_CONNECT2_GETATTR_PFID      0x20000ULL /* pack parent FID in getattr */
 #define OBD_CONNECT2_LSEEK            0x40000ULL /* SEEK_HOLE/DATA RPC */
 #define OBD_CONNECT2_DOM_LVB          0x80000ULL /* pack DOM glimpse data in LVB */
-#define OBD_CONNECT2_REP_MBITS         0x100000ULL /* match reply by mbits, not xid */
+#define OBD_CONNECT2_REP_MBITS       0x100000ULL /* match reply mbits not xid*/
+#define OBD_CONNECT2_MODE_CONVERT     0x200000ULL /* LDLM mode convert */
+#define OBD_CONNECT2_BATCH_RPC        0x400000ULL /* Multi-RPC batch request */
+#define OBD_CONNECT2_PCCRO           0x800000ULL /* Read-only PCC */
 #define OBD_CONNECT2_ATOMIC_OPEN_LOCK 0x4000000ULL/* request lock on 1st open */
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
@@ -2733,6 +2736,7 @@ enum llog_op_type {
        /* LLOG_JOIN_REC        = LLOG_OP_MAGIC | 0x50000, obsolete  1.8.0 */
        CHANGELOG_REC           = LLOG_OP_MAGIC | 0x60000,
        CHANGELOG_USER_REC      = LLOG_OP_MAGIC | 0x70000,
+       CHANGELOG_USER_REC2     = LLOG_OP_MAGIC | 0x70002,
        HSM_AGENT_REC           = LLOG_OP_MAGIC | 0x80000,
        UPDATE_REC              = LLOG_OP_MAGIC | 0xa0000,
        LLOG_HDR_MAGIC          = LLOG_OP_MAGIC | 0x45539,
@@ -2833,9 +2837,9 @@ struct llog_size_change_rec {
 #define CHANGELOG_MAGIC 0xca103000
 
 /** \a changelog_rec_type's that can't be masked */
-#define CHANGELOG_MINMASK (1 << CL_MARK)
+#define CHANGELOG_MINMASK BIT(CL_MARK)
 /** bits covering all \a changelog_rec_type's */
-#define CHANGELOG_ALLMASK 0XFFFFFFFF
+#define CHANGELOG_ALLMASK (BIT(CL_LAST) - 1)
 /** default \a changelog_rec_type mask. Allow all of them, except
  * CL_ATIME since it can really be time consuming, and not necessary
  * under normal use.
@@ -2843,8 +2847,7 @@ struct llog_size_change_rec {
  * be costly and only necessary for audit purpose.
  */
 #define CHANGELOG_DEFMASK (CHANGELOG_ALLMASK & \
-                          ~(1 << CL_ATIME | 1 << CL_OPEN | 1 << CL_GETXATTR | \
-                            1 << CL_DN_OPEN))
+       ~(BIT(CL_ATIME) | BIT(CL_OPEN) | BIT(CL_GETXATTR) | BIT(CL_DN_OPEN)))
 
 /* changelog llog name, needed by client replicators */
 #define CHANGELOG_CATALOG "changelog_catalog"
@@ -2862,6 +2865,8 @@ struct llog_changelog_rec {
 } __attribute__((packed));
 
 #define CHANGELOG_USER_PREFIX "cl"
+#define CHANGELOG_USER_NAMELEN 16 /* base name including NUL terminator */
+#define CHANGELOG_USER_NAMELEN_FULL 30 /* basename plus 'cl$ID-' prefix */
 
 struct llog_changelog_user_rec {
        struct llog_rec_hdr   cur_hdr;
@@ -2873,6 +2878,21 @@ struct llog_changelog_user_rec {
        struct llog_rec_tail  cur_tail;
 } __attribute__((packed));
 
+/* this is twice the size of CHANGELOG_USER_REC */
+struct llog_changelog_user_rec2 {
+       struct llog_rec_hdr     cur_hdr;
+       __u32                   cur_id;
+       /* only for use in relative time comparisons to detect idle users */
+       __u32                   cur_time;
+       __u64                   cur_endrec;
+       __u32                   cur_mask;
+       __u32                   cur_padding1;
+       char                    cur_name[CHANGELOG_USER_NAMELEN];
+       __u64                   cur_padding2;
+       __u64                   cur_padding3;
+       struct llog_rec_tail    cur_tail;
+} __attribute__((packed));
+
 enum agent_req_status {
        ARS_WAITING,
        ARS_STARTED,