Linux Kernels

staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY

This change “staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY” (commit 554f072) in Linux kernel is authored by Andriy Skulysh <Andriy_Skulysh [at] xyratex.com> on Tue Apr 12 16:14:14 2016 -0400.

Description of "staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY"

The change “staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY” introduces changes as follows.

staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY

Patch for LU-631 which was landed before the upstream merge broke
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.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4010
Reviewed-on: http://review.whamcloud.com/7762
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Linux kernel releases containing commit 554f072

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY"

There are 7 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/lustre/lustre/lov/lov_request.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
 
diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c
index 8226ab25790f..4d7073e7cef4 100644
--- a/drivers/staging/lustre/lustre/lov/lov_request.c
+++ b/drivers/staging/lustre/lustre/lov/lov_request.c
@@ -715,12 +715,15 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
 		struct lov_request *req;
 
 		if (!lov->lov_tgts[i] ||
-		    (!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 explicitly disabled by the
 		 * administrator
 		 */

The commit for this change in Linux stable tree is 554f072 (patch).

Last modified: 2020/01/11 09:44