Whamcloud - gitweb
LU-7669 lmv: assume a real connection in lmv_connect()
[fs/lustre-release.git] / lustre / include / obd.h
index e94cd49..04cdca5 100644 (file)
@@ -53,6 +53,7 @@
 #include <lustre_handles.h>
 #include <lustre_intent.h>
 #include <lvfs.h>
+#include <lustre_quota.h>
 
 #define MAX_OBD_DEVICES 8192
 
@@ -154,6 +155,12 @@ enum {
  */
 #define OBD_MAX_DEFAULT_EA_SIZE                4096
 
+enum obd_cl_sem_lock_class {
+       OBD_CLI_SEM_NORMAL,
+       OBD_CLI_SEM_MGC,
+       OBD_CLI_SEM_MDCOSC,
+};
+
 struct mdc_rpc_lock;
 struct obd_import;
 struct client_obd {
@@ -327,7 +334,7 @@ struct client_obd {
        void                    *cl_writeback_work;
        void                    *cl_lru_work;
        /* hash tables for osc_quota_info */
-       struct cfs_hash         *cl_quota_hash[MAXQUOTAS];
+       struct cfs_hash         *cl_quota_hash[LL_MAXQUOTAS];
 };
 #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
 
@@ -400,23 +407,11 @@ struct lmv_tgt_desc {
        unsigned long           ltd_active:1; /* target up for requests */
 };
 
-enum placement_policy {
-        PLACEMENT_CHAR_POLICY   = 0,
-        PLACEMENT_NID_POLICY    = 1,
-        PLACEMENT_INVAL_POLICY  = 2,
-        PLACEMENT_MAX_POLICY
-};
-
-typedef enum placement_policy placement_policy_t;
-
 struct lmv_obd {
-       int                     refcount;
        struct lu_client_fld    lmv_fld;
        spinlock_t              lmv_lock;
-       placement_policy_t      lmv_placement;
        struct lmv_desc         desc;
        struct obd_uuid         cluuid;
-       struct obd_export       *exp;
        struct proc_dir_entry   *targets_proc_entry;
 
        struct mutex            lmv_init_mutex;
@@ -539,8 +534,6 @@ enum obd_notify_event {
         OBD_NOTIFY_ACTIVE,
         /* Device deactivated */
         OBD_NOTIFY_INACTIVE,
-        /* Device disconnected */
-        OBD_NOTIFY_DISCON,
         /* Connect data for import were changed */
         OBD_NOTIFY_OCD,
         /* Sync request */
@@ -975,7 +968,6 @@ struct lustre_md {
 #ifdef CONFIG_FS_POSIX_ACL
        struct posix_acl        *posix_acl;
 #endif
-       struct mdt_remote_perm  *remote_perm;
 };
 
 struct md_open_data {
@@ -1069,12 +1061,9 @@ struct md_ops {
 
 #define MD_STATS_LAST_OP m_revalidate_lock
 
-       int (*m_getstatus)(struct obd_export *, struct lu_fid *);
+       int (*m_get_root)(struct obd_export *, const char *, 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 *,
-                            ldlm_iterator_t, void *);
-
        int (*m_getattr_name)(struct obd_export *, struct md_op_data *,
                              struct ptlrpc_request **);
 
@@ -1097,7 +1086,8 @@ struct md_ops {
        int (*m_clear_open_replay_data)(struct obd_export *,
                                        struct obd_client_handle *);
 
-       int (*m_set_lock_data)(struct obd_export *, __u64 *, void *, __u64 *);
+       int (*m_set_lock_data)(struct obd_export *,
+                              const struct lustre_handle *, void *, __u64 *);
 
        enum ldlm_mode (*m_lock_match)(struct obd_export *, __u64,
                                       const struct lu_fid *, enum ldlm_type,
@@ -1108,9 +1098,6 @@ struct md_ops {
                               union ldlm_policy_data *, enum ldlm_mode,
                               enum ldlm_cancel_flags flags, void *opaque);
 
-       int (*m_get_remote_perm)(struct obd_export *, const struct lu_fid *,
-                                u32, struct ptlrpc_request **);
-
        int (*m_get_fid_from_lsm)(struct obd_export *,
                                  const struct lmv_stripe_md *,
                                  const char *name, int namelen,