Whamcloud - gitweb
Wrap kms updates into a helper function.
authornikita <nikita>
Sat, 18 Oct 2008 17:11:31 +0000 (17:11 +0000)
committernikita <nikita>
Sat, 18 Oct 2008 17:11:31 +0000 (17:11 +0000)
b=16450

lustre/ChangeLog
lustre/include/obd.h
lustre/lov/lov_merge.c

index 2c214df..e601ff3 100644 (file)
@@ -1581,6 +1581,11 @@ Description: Add lockdep annotations to llog code.
 Details    : Use appropriately tagged _nested() locking calls in the places
             where llog takes more than one ->lgh_lock lock.
        
+Severity   : minor
+Bugzilla   : 16450
+Description: Add loi_kms_set().
+Details    : Wrap kms updates into a helper function.
+       
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
index 55f1d26..cef96db 100644 (file)
@@ -107,6 +107,12 @@ struct lov_oinfo {                 /* per-stripe data structure */
         struct osc_async_rc     loi_ar;
 };
 
+static inline void loi_kms_set(struct lov_oinfo *oinfo, __u64 kms)
+{
+        oinfo->loi_kms = kms;
+        oinfo->loi_kms_valid = 1;
+}
+
 static inline void loi_init(struct lov_oinfo *loi)
 {
         CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_pending);
index b067ff3..47e87e0 100644 (file)
@@ -136,7 +136,7 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
                                "stripe %d KMS %sing "LPU64"->"LPU64"\n",
                                stripe, kms > loi->loi_kms ? "increas":"shrink",
                                loi->loi_kms, kms);
-                        loi->loi_kms = loi->loi_lvb.lvb_size = kms;
+                        loi_kms_set(loi, loi->loi_lvb.lvb_size = kms);
                 }
                 RETURN(0);
         }
@@ -149,7 +149,7 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
         CDEBUG(D_INODE, "stripe %d KMS %sincreasing "LPU64"->"LPU64"\n",
                stripe, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms);
         if (kms > loi->loi_kms)
-                loi->loi_kms = kms;
+                loi_kms_set(loi, kms);
 
         RETURN(0);
 }