Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753703AbcDJNOX (ORCPT ); Sun, 10 Apr 2016 09:14:23 -0400 Received: from smtp1.ccs.ornl.gov ([160.91.199.38]:42640 "EHLO smtp1.ccs.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753621AbcDJNOV (ORCPT ); Sun, 10 Apr 2016 09:14:21 -0400 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , Lustre Development List , Andriy Skulysh , James Simmons Subject: [PATCH 15/17] staging: lustre: lov: Don't wait for active target with OBD_STATFS_NODELAY Date: Sun, 10 Apr 2016 09:13:38 -0400 Message-Id: <1460294020-2111-16-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1460294020-2111-1-git-send-email-jsimmons@infradead.org> References: <1460294020-2111-1-git-send-email-jsimmons@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1550 Lines: 41 From: Andriy Skulysh 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 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4010 Reviewed-on: http://review.whamcloud.com/7762 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/lov/lov_request.c | 7 +++++-- 1 files 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 7178a02..475ca2f 100644 --- a/drivers/staging/lustre/lustre/lov/lov_request.c +++ b/drivers/staging/lustre/lustre/lov/lov_request.c @@ -716,12 +716,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 */ -- 1.7.1