Whamcloud - gitweb
LU-5814 obd: rename obd_unpackmd() to md_unpackmd()
[fs/lustre-release.git] / lustre / include / obd.h
index ee7873a..c658de1 100644 (file)
@@ -52,7 +52,6 @@
 #include <lustre_fld.h>
 #include <lustre_handles.h>
 #include <lustre_intent.h>
-#include <lustre_capa.h>
 #include <lvfs.h>
 
 #define MAX_OBD_DEVICES 8192
@@ -294,7 +293,7 @@ struct client_obd {
        void                    *cl_writeback_work;
        void                    *cl_lru_work;
        /* hash tables for osc_quota_info */
-       cfs_hash_t              *cl_quota_hash[MAXQUOTAS];
+       struct cfs_hash         *cl_quota_hash[MAXQUOTAS];
 };
 #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
 
@@ -348,7 +347,7 @@ struct lov_obd {
        __u32                   lov_tgt_size;   /* size of tgts array */
        int                     lov_connects;
        int                     lov_pool_count;
-       cfs_hash_t             *lov_pools_hash_body; /* used for key access */
+       struct cfs_hash        *lov_pools_hash_body; /* used for key access */
        struct list_head        lov_pool_list;  /* used for sequential access */
        struct proc_dir_entry  *lov_pool_proc_entry;
        enum lustre_sec_part    lov_sp_me;
@@ -533,17 +532,18 @@ struct obd_device {
                                         * (for /proc/status only!!) */
                obd_no_ir:1,            /* no imperative recovery. */
                obd_process_conf:1,     /* device is processing mgs config */
-               obd_uses_nid_stats:1;   /* maintain per-client OBD stats */
+               obd_uses_nid_stats:1,   /* maintain per-client OBD stats */
+               obd_force_abort_recovery:1; /* abort recovery forcely */
 
         /* use separate field as it is set in interrupt to don't mess with
          * protection of other bits using _bh lock */
         unsigned long obd_recovery_expired:1;
         /* uuid-export hash body */
-        cfs_hash_t             *obd_uuid_hash;
+       struct cfs_hash             *obd_uuid_hash;
         /* nid-export hash body */
-        cfs_hash_t             *obd_nid_hash;
+       struct cfs_hash             *obd_nid_hash;
        /* nid stats body */
-       cfs_hash_t             *obd_nid_stats_hash;
+       struct cfs_hash             *obd_nid_stats_hash;
        struct list_head        obd_nid_stats;
        atomic_t                obd_refcount;
        struct list_head        obd_exports;
@@ -655,7 +655,6 @@ enum obd_cleanup_stage {
 
 /* get/set_info keys */
 #define KEY_ASYNC               "async"
-#define KEY_CAPA_KEY            "capa_key"
 #define KEY_CHANGELOG_CLEAR     "changelog_clear"
 #define KEY_FID2PATH            "fid2path"
 #define KEY_CHECKSUM            "checksum"
@@ -765,10 +764,6 @@ struct md_op_data {
 
        enum md_op_flags        op_flags;
 
-       /* Capa fields */
-       struct obd_capa        *op_capa1;
-       struct obd_capa        *op_capa2;
-
        /* Various operation flags. */
        enum mds_op_bias        op_bias;
 
@@ -859,8 +854,6 @@ struct obd_ops {
                         struct obd_statfs *osfs, __u64 max_age, __u32 flags);
         int (*o_statfs_async)(struct obd_export *exp, struct obd_info *oinfo,
                               __u64 max_age, struct ptlrpc_request_set *set);
-        int (*o_unpackmd)(struct obd_export *exp,struct lov_stripe_md **mem_tgt,
-                          struct lov_mds_md *disk_src, int disk_len);
        int (*o_create)(const struct lu_env *env, struct obd_export *exp,
                        struct obdo *oa);
        int (*o_destroy)(const struct lu_env *env, struct obd_export *exp,
@@ -914,14 +907,12 @@ struct obd_ops {
 /* lmv structures */
 struct lustre_md {
        struct mdt_body         *body;
-       struct lov_stripe_md    *lsm;
+       struct lu_buf            layout;
        struct lmv_stripe_md    *lmv;
 #ifdef CONFIG_FS_POSIX_ACL
        struct posix_acl        *posix_acl;
 #endif
        struct mdt_remote_perm  *remote_perm;
-       struct obd_capa         *mds_capa;
-       struct obd_capa         *oss_capa;
 };
 
 struct md_open_data {
@@ -990,7 +981,7 @@ struct md_ops {
                         size_t , struct ptlrpc_request **);
 
        int (*m_fsync)(struct obd_export *, const struct lu_fid *,
-                      struct obd_capa *, struct ptlrpc_request **);
+                      struct ptlrpc_request **);
 
        int (*m_read_page)(struct obd_export *, struct md_op_data *,
                           struct md_callback *cb_op, __u64 hash_offset,
@@ -1000,13 +991,11 @@ struct md_ops {
                        struct ptlrpc_request **);
 
        int (*m_setxattr)(struct obd_export *, const struct lu_fid *,
-                         struct obd_capa *, u64, const char *,
-                         const char *, int, int, int, __u32,
+                         u64, const char *, const char *, int, int, int, u32,
                          struct ptlrpc_request **);
 
        int (*m_getxattr)(struct obd_export *, const struct lu_fid *,
-                         struct obd_capa *, u64, const char *,
-                         const char *, int, int, int,
+                         u64, const char *, const char *, int, int, int,
                          struct ptlrpc_request **);
 
         int (*m_intent_getattr_async)(struct obd_export *,
@@ -1018,9 +1007,7 @@ struct md_ops {
 
 #define MD_STATS_LAST_OP m_revalidate_lock
 
-       int (*m_getstatus)(struct obd_export *, struct lu_fid *,
-                          struct obd_capa **);
-
+       int (*m_getstatus)(struct obd_export *, struct lu_fid *);
        int (*m_null_inode)(struct obd_export *, const struct lu_fid *);
 
        int (*m_find_cbdata)(struct obd_export *, const struct lu_fid *,
@@ -1059,20 +1046,15 @@ struct md_ops {
                               ldlm_policy_data_t *, ldlm_mode_t,
                               ldlm_cancel_flags_t flags, void *opaque);
 
-       int (*m_renew_capa)(struct obd_export *, struct obd_capa *oc,
-                           renew_capa_cb_t cb);
-
-       int (*m_unpack_capa)(struct obd_export *, struct ptlrpc_request *,
-                            const struct req_msg_field *, struct obd_capa **);
-
        int (*m_get_remote_perm)(struct obd_export *, const struct lu_fid *,
-                                struct obd_capa *, __u32,
-                                struct ptlrpc_request **);
+                                u32, struct ptlrpc_request **);
 
        int (*m_get_fid_from_lsm)(struct obd_export *,
                                  const struct lmv_stripe_md *,
                                  const char *name, int namelen,
                                  struct lu_fid *fid);
+       int (*m_unpackmd)(struct obd_export *exp, struct lmv_stripe_md **plsm,
+                         const union lmv_mds_md *lmv, size_t lmv_size);
 };
 
 static inline struct md_open_data *obd_mod_alloc(void)