Whamcloud - gitweb
LU-3677 mdt: Set HSM dirty open-for-write file when evicted.
[fs/lustre-release.git] / lustre / include / obd.h
index e9150ae..ce55df9 100644 (file)
@@ -1046,6 +1046,7 @@ struct lu_context;
 #define IT_LAYOUT   (1 << 10)
 #define IT_QUOTA_DQACQ (1 << 11)
 #define IT_QUOTA_CONN  (1 << 12)
+#define IT_SETXATTR (1 << 13)
 
 static inline int it_to_lock_mode(struct lookup_intent *it)
 {
@@ -1055,6 +1056,10 @@ static inline int it_to_lock_mode(struct lookup_intent *it)
         else if (it->it_op & (IT_READDIR | IT_GETATTR | IT_OPEN | IT_LOOKUP |
                               IT_LAYOUT))
                 return LCK_CR;
+       else if (it->it_op &  IT_GETXATTR)
+               return LCK_PR;
+       else if (it->it_op &  IT_SETXATTR)
+               return LCK_PW;
 
         LASSERTF(0, "Invalid it_op: %d\n", it->it_op);
         return -EINVAL;
@@ -1084,24 +1089,24 @@ struct md_op_data {
 #ifdef __KERNEL__
        unsigned int            op_attr_flags;
 #endif
-        __u64                   op_valid;
-        loff_t                  op_attr_blocks;
+       __u64                   op_valid;
+       loff_t                  op_attr_blocks;
 
-        /* Size-on-MDS epoch and flags. */
-        __u64                   op_ioepoch;
+       /* Size-on-MDS epoch and flags. */
+       __u64                   op_ioepoch;
        __u32                   op_flags;
 
-        /* Capa fields */
-        struct obd_capa        *op_capa1;
-        struct obd_capa        *op_capa2;
+       /* Capa fields */
+       struct obd_capa        *op_capa1;
+       struct obd_capa        *op_capa2;
 
-        /* Various operation flags. */
-       __u32                   op_bias;
+       /* Various operation flags. */
+       enum mds_op_bias        op_bias;
 
-        /* Operation type */
+       /* Operation type */
        __u32                   op_opc;
 
-        /* Used by readdir */
+       /* Used by readdir */
        __u64                   op_offset;
 
        /* Used by readdir */
@@ -1110,6 +1115,10 @@ struct md_op_data {
        /* used to transfer info between the stacks of MD client
         * see enum op_cli_flags */
        __u32                   op_cli_flags;
+
+       /* File object data version for HSM release, on client */
+       __u64                   op_data_version;
+       struct lustre_handle    op_lease_handle;
 };
 
 enum op_cli_flags {