Whamcloud - gitweb
Branch HEAD
authorbobijam <bobijam>
Thu, 10 Jan 2008 03:48:40 +0000 (03:48 +0000)
committerbobijam <bobijam>
Thu, 10 Jan 2008 03:48:40 +0000 (03:48 +0000)
b=13375
i=adilger
i=johann
i=nathan

Descriptoin: make lov_create() will not stuck in obd_statfs_rqset()
Details    : If an OST is down the MDS will hang indefinitely in
             obd_statfs_rqset() waiting for the statfs data. While for
             MDS QOS usage of statfs, it should not stuck in waiting.

lustre/ChangeLog
lustre/include/obd_class.h
lustre/liblustre/super.c
lustre/llite/llite_lib.c
lustre/lov/lov_obd.c

index 68459cc..fd5745a 100644 (file)
@@ -10,6 +10,13 @@ tbd  Sun Microsystems, Inc.
        * Recommended e2fsprogs version: 1.40.2-cfs5
        * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
 
+Severity   : normal
+Bugzilla   : 13375
+Descriptoin: make lov_create() will not stuck in obd_statfs_rqset()
+Details    : If an OST is down the MDS will hang indefinitely in
+             obd_statfs_rqset() waiting for the statfs data. While for
+            MDS QOS usage of statfs, it should not stuck in waiting.
+
 Severity   : enhancement
 Bugzilla   : 14288
 Description: Update to RHEL4 U6 kernel-2.6.9-67.EL.
index b863841..46b1196 100644 (file)
@@ -1006,7 +1006,8 @@ static inline int obd_statfs_async(struct obd_device *obd,
 }
 
 static inline int obd_statfs_rqset(struct obd_device *obd,
-                                   struct obd_statfs *osfs, __u64 max_age)
+                                   struct obd_statfs *osfs, __u64 max_age,
+                                   int quick_pry)
 {
         struct ptlrpc_request_set *set = NULL;
         struct obd_info oinfo = { { { 0 } } };
@@ -1019,8 +1020,19 @@ static inline int obd_statfs_rqset(struct obd_device *obd,
 
         oinfo.oi_osfs = osfs;
         rc = obd_statfs_async(obd, &oinfo, max_age, set);
-        if (rc == 0)
+        if (rc == 0) {
+                struct ptlrpc_request *req;
+
+                if (quick_pry)
+                        list_for_each_entry(req, &set->set_requests,
+                                            rq_set_chain) {
+                                spin_lock(&req->rq_lock);
+                                req->rq_no_resend = 1;
+                                req->rq_no_delay  = 1;
+                                spin_unlock(&req->rq_lock);
+                        }
                 rc = ptlrpc_set_wait(set);
+        }
         ptlrpc_set_destroy(set);
         RETURN(rc);
 }
index cefd4a0..e24258c 100644 (file)
@@ -1205,7 +1205,7 @@ static int llu_statfs_internal(struct llu_sb_info *sbi,
                osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
 
         rc = obd_statfs_rqset(class_exp2obd(sbi->ll_dt_exp),
-                              &obd_statfs, max_age);
+                              &obd_statfs, max_age, 0);
         if (rc) {
                 CERROR("obd_statfs fails: rc = %d\n", rc);
                 RETURN(rc);
index 06e3b79..ed8ae79 100644 (file)
@@ -1442,7 +1442,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
                osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
 
         rc = obd_statfs_rqset(class_exp2obd(sbi->ll_dt_exp),
-                              &obd_osfs, max_age);
+                              &obd_osfs, max_age, 0);
         if (rc) {
                 CERROR("obd_statfs fails: rc = %d\n", rc);
                 RETURN(rc);
index a3a4563..50ebb49 100644 (file)
@@ -1017,7 +1017,7 @@ static int lov_create(struct obd_export *exp, struct obdo *src_oa,
         }
 
         maxage = cfs_time_shift_64(-lov->desc.ld_qos_maxage);
-        obd_statfs_rqset(exp->exp_obd, &osfs, maxage);
+        obd_statfs_rqset(exp->exp_obd, &osfs, maxage, 1);
 
         rc = lov_prep_create_set(exp, &oinfo, ea, src_oa, oti, &set);
         if (rc)