From d6701a7aad64a6286055abee88d0c34c0a490927 Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Wed, 25 Sep 2013 22:18:47 +0300 Subject: [PATCH] LU-4010 lov: Don't wait for active target with OBD_STATFS_NODELAY 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 Reviewed-on: http://review.whamcloud.com/7762 Reviewed-by: Andreas Dilger Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/lov/lov_request.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c index 5e5da33..730a5a1 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -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) { -- 1.8.3.1