Whamcloud - gitweb
LU-3677 mdt: Set HSM dirty open-for-write file when evicted.
[fs/lustre-release.git] / lustre / include / obd.h
index 6afec97..ce55df9 100644 (file)
@@ -266,22 +266,23 @@ struct brw_page {
 
 /* llog contexts */
 enum llog_ctxt_id {
-        LLOG_CONFIG_ORIG_CTXT  =  0,
-        LLOG_CONFIG_REPL_CTXT,
-        LLOG_MDS_OST_ORIG_CTXT,
-        LLOG_MDS_OST_REPL_CTXT,
-        LLOG_SIZE_ORIG_CTXT,
-        LLOG_SIZE_REPL_CTXT,
-        LLOG_RD1_ORIG_CTXT,
-        LLOG_RD1_REPL_CTXT,
-        LLOG_TEST_ORIG_CTXT,
-        LLOG_TEST_REPL_CTXT,
-        LLOG_LOVEA_ORIG_CTXT,
-        LLOG_LOVEA_REPL_CTXT,
-        LLOG_CHANGELOG_ORIG_CTXT,      /**< changelog generation on mdd */
-        LLOG_CHANGELOG_REPL_CTXT,      /**< changelog access on clients */
-        LLOG_CHANGELOG_USER_ORIG_CTXT, /**< for multiple changelog consumers */
-        LLOG_MAX_CTXTS
+       LLOG_CONFIG_ORIG_CTXT  =  0,
+       LLOG_CONFIG_REPL_CTXT,
+       LLOG_MDS_OST_ORIG_CTXT,
+       LLOG_MDS_OST_REPL_CTXT,
+       LLOG_SIZE_ORIG_CTXT,
+       LLOG_SIZE_REPL_CTXT,
+       LLOG_RD1_ORIG_CTXT,
+       LLOG_RD1_REPL_CTXT,
+       LLOG_TEST_ORIG_CTXT,
+       LLOG_TEST_REPL_CTXT,
+       LLOG_LOVEA_ORIG_CTXT,
+       LLOG_LOVEA_REPL_CTXT,
+       LLOG_CHANGELOG_ORIG_CTXT,       /**< changelog generation on mdd */
+       LLOG_CHANGELOG_REPL_CTXT,       /**< changelog access on clients */
+       LLOG_CHANGELOG_USER_ORIG_CTXT,  /**< for multiple changelog consumers */
+       LLOG_AGENT_ORIG_CTXT,           /**< agent requests generation on cdt */
+       LLOG_MAX_CTXTS
 };
 
 struct timeout_item {
@@ -410,8 +411,8 @@ struct client_obd {
 
         /* mgc datastruct */
        struct semaphore         cl_mgc_sem;
-        struct vfsmount         *cl_mgc_vfsmnt;
-        struct dentry           *cl_mgc_configs_dir;
+       struct local_oid_storage *cl_mgc_los;
+       struct dt_object        *cl_mgc_configs_dir;
         cfs_atomic_t             cl_mgc_refcount;
         struct obd_export       *cl_mgc_mgsexp;
 
@@ -1045,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)
 {
@@ -1054,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;
@@ -1083,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 */
@@ -1109,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 {