Whamcloud - gitweb
LU-4010 lov: Don't wait for active target with OBD_STATFS_NODELAY 62/7762/4
authorAndriy Skulysh <Andriy_Skulysh@xyratex.com>
Wed, 25 Sep 2013 19:18:47 +0000 (22:18 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 3 Oct 2013 04:26:13 +0000 (04:26 +0000)
commit 6c3c5c7b breaks OBD_STATFS_NODELAY behaviour.
It adds unnecessary delay while running df command with inactive OSTs.
We shouldn't try to recover connection to OST in this case.

Change-Id: Ia04cfb76b393df4f0c4c8d841b48d20306025c92
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/7762
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lov/lov_request.c

index 5e5da33..730a5a1 100644 (file)
@@ -1529,12 +1529,15 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
                struct lov_request *req;
 
                if (lov->lov_tgts[i] == NULL ||
-                   (!lov_check_and_wait_active(lov, i) &&
-                    (oinfo->oi_flags & OBD_STATFS_NODELAY))) {
+                   (oinfo->oi_flags & OBD_STATFS_NODELAY &&
+                    !lov->lov_tgts[i]->ltd_active)) {
                        CDEBUG(D_HA, "lov idx %d inactive\n", i);
                        continue;
                }
 
+               if (!lov->lov_tgts[i]->ltd_active)
+                       lov_check_and_wait_active(lov, i);
+
                 /* skip targets that have been explicitely disabled by the
                  * administrator */
                 if (!lov->lov_tgts[i]->ltd_exp) {