Whamcloud - gitweb
LU-12635 build: Support for gcc -Wimplicit-fallthrough
[fs/lustre-release.git] / lustre / lod / lod_qos.c
index 5015310..739720f 100644 (file)
@@ -78,9 +78,8 @@
  * \retval negative    negated errno on error
 
  */
-int lod_statfs_and_check(const struct lu_env *env, struct lod_device *d,
-                        int index, struct obd_statfs *sfs,
-                        struct obd_statfs_info *info)
+static int lod_statfs_and_check(const struct lu_env *env, struct lod_device *d,
+                               int index, struct obd_statfs *sfs)
 {
        struct lod_tgt_desc *ost;
        int                  rc;
@@ -90,7 +89,7 @@ int lod_statfs_and_check(const struct lu_env *env, struct lod_device *d,
        ost = OST_TGT(d,index);
        LASSERT(ost);
 
-       rc = dt_statfs(env, ost->ltd_ost, sfs, info);
+       rc = dt_statfs(env, ost->ltd_ost, sfs);
 
        if (rc == 0 && ((sfs->os_state & OS_STATE_ENOSPC) ||
            (sfs->os_state & OS_STATE_ENOINO && sfs->os_fprecreated == 0)))
@@ -180,7 +179,7 @@ void lod_qos_statfs_update(const struct lu_env *env, struct lod_device *lod)
                idx = osts->op_array[i];
                avail = OST_TGT(lod,idx)->ltd_statfs.os_bavail;
                if (lod_statfs_and_check(env, lod, idx,
-                                        &OST_TGT(lod, idx)->ltd_statfs, NULL))
+                                        &OST_TGT(lod, idx)->ltd_statfs))
                        continue;
                if (OST_TGT(lod,idx)->ltd_statfs.os_bavail != avail)
                        /* recalculate weigths */
@@ -435,12 +434,6 @@ static int lod_qos_used(struct lod_device *lod, struct ost_pool *osts,
        RETURN(0);
 }
 
-void lod_qos_rr_init(struct lu_qos_rr *lqr)
-{
-       spin_lock_init(&lqr->lqr_alloc);
-       lqr->lqr_dirty = 1;
-}
-
 #define LOV_QOS_EMPTY ((__u32)-1)
 
 /**
@@ -838,7 +831,7 @@ static int lod_check_and_reserve_ost(const struct lu_env *env,
        int rc;
        ENTRY;
 
-       rc = lod_statfs_and_check(env, lod, ost_idx, sfs, NULL);
+       rc = lod_statfs_and_check(env, lod, ost_idx, sfs);
        if (rc)
                RETURN(rc);
 
@@ -1163,7 +1156,7 @@ static int lod_alloc_ost_list(const struct lu_env *env, struct lod_object *lo,
                        break;
                }
 
-               rc = lod_statfs_and_check(env, m, ost_idx, sfs, NULL);
+               rc = lod_statfs_and_check(env, m, ost_idx, sfs);
                if (rc < 0) /* this OSP doesn't feel well */
                        break;
 
@@ -1307,7 +1300,7 @@ repeat_find:
                 * start OST, then it can be skipped, otherwise skip it only
                 * if it is inactive/recovering/out-of-space." */
 
-               rc = lod_statfs_and_check(env, m, ost_idx, sfs, NULL);
+               rc = lod_statfs_and_check(env, m, ost_idx, sfs);
                if (rc) {
                        /* this OSP doesn't feel well */
                        continue;
@@ -1508,8 +1501,7 @@ static int lod_alloc_qos(const struct lu_env *env, struct lod_object *lo,
                ost = OST_TGT(lod, osts->op_array[i]);
                ost->ltd_qos.ltq_usable = 0;
 
-               rc = lod_statfs_and_check(env, lod, osts->op_array[i],
-                                         sfs, NULL);
+               rc = lod_statfs_and_check(env, lod, osts->op_array[i], sfs);
                if (rc) {
                        /* this OSP doesn't feel well */
                        continue;