Whamcloud - gitweb
LU-7674 lmv: remove unused placement parameter
[fs/lustre-release.git] / lustre / include / obd.h
index 9f1ddcf..4231d02 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 {
@@ -192,6 +199,8 @@ struct client_obd {
        unsigned long            cl_dirty_transit;    /* dirty synchronous */
        unsigned long            cl_avail_grant;   /* bytes of credit for ost */
        unsigned long            cl_lost_grant;    /* lost credits (trunc) */
+       /* grant consumed for dirty pages */
+       unsigned long            cl_dirty_grant;
 
        /* since we allocate grant by blocks, we don't know how many grant will
         * be used to add a page into cache. As a solution, we reserve maximum
@@ -206,7 +215,11 @@ struct client_obd {
        /* A chunk is an optimal size used by osc_extent to determine
         * the extent size. A chunk is max(PAGE_CACHE_SIZE, OST block size) */
        int                     cl_chunkbits;
-       unsigned int            cl_extent_tax;  /* extent overhead, by bytes */
+       /* extent insertion metadata overhead to be accounted in grant,
+        * in bytes */
+       unsigned int            cl_grant_extent_tax;
+       /* maximum extent size, in number of pages */
+       unsigned int            cl_max_extent_pages;
 
        /* keep track of objects that have lois that contain pages which
         * have been queued for async brw.  this lock also protects the
@@ -321,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)
 
@@ -394,20 +407,10 @@ 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;
@@ -611,8 +614,7 @@ 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_force_abort_recovery:1; /* abort recovery forcely */
+               obd_uses_nid_stats:1;   /* maintain per-client OBD stats */
 
         /* use separate field as it is set in interrupt to don't mess with
          * protection of other bits using _bh lock */
@@ -970,7 +972,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 {
@@ -1064,12 +1065,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 **);
 
@@ -1092,7 +1090,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,
@@ -1103,9 +1102,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,