From patchwork Thu Feb 27 21:10:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11409913 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9100138D for ; Thu, 27 Feb 2020 21:25:33 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1CEB246A0 for ; Thu, 27 Feb 2020 21:25:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1CEB246A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 46959348E95; Thu, 27 Feb 2020 13:22:56 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 28FB121FBBA for ; Thu, 27 Feb 2020 13:19:03 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id 0BE5E1E88; Thu, 27 Feb 2020 16:18:15 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 0A4AF46A; Thu, 27 Feb 2020 16:18:15 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 27 Feb 2020 16:10:18 -0500 Message-Id: <1582838290-17243-151-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> References: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 150/622] lustre: lov: add debugging info for statfs X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Andreas Dilger In obd_statfs() print the device name in the debug logs for clarity. WC-bug-id: https://jira.whamcloud.com/browse/LU-7770 Lustre-commit: b917406a7f0a ("LU-7770 lov: fix statfs for conf-sanity test_50b") Signed-off-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/33369 Reviewed-by: Ben Evans Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/include/obd_class.h | 14 +++++++------- fs/lustre/lov/lov_obd.c | 4 +--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/fs/lustre/include/obd_class.h b/fs/lustre/include/obd_class.h index 01eb385..742e92a 100644 --- a/fs/lustre/include/obd_class.h +++ b/fs/lustre/include/obd_class.h @@ -891,8 +891,8 @@ static inline int obd_statfs_async(struct obd_export *exp, time64_t max_age, struct ptlrpc_request_set *rqset) { - int rc = 0; struct obd_device *obd; + int rc = 0; if (!exp || !exp->exp_obd) return -EINVAL; @@ -903,8 +903,8 @@ static inline int obd_statfs_async(struct obd_export *exp, return -EOPNOTSUPP; } - CDEBUG(D_SUPER, "%s: osfs %p age %lld, max_age %lld\n", - obd->obd_name, &obd->obd_osfs, obd->obd_osfs_age, max_age); + CDEBUG(D_SUPER, "%s: age %lld, max_age %lld\n", + obd->obd_name, obd->obd_osfs_age, max_age); if (obd->obd_osfs_age < max_age) { rc = OBP(obd, statfs_async)(exp, oinfo, max_age, rqset); } else { @@ -935,20 +935,20 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, struct obd_device *obd = exp->exp_obd; int rc = 0; - if (!obd) + if (unlikely(!obd)) return -EINVAL; rc = obd_check_dev_active(obd); if (rc) return rc; - if (!obd->obd_type || !obd->obd_type->typ_dt_ops->statfs) { + if (unlikely(!obd->obd_type || !obd->obd_type->typ_dt_ops->statfs)) { CERROR("%s: no %s operation\n", obd->obd_name, __func__); return -EOPNOTSUPP; } - CDEBUG(D_SUPER, "osfs %lld, max_age %lld\n", - obd->obd_osfs_age, max_age); + CDEBUG(D_SUPER, "%s: age %lld, max_age %lld\n", + obd->obd_name, obd->obd_osfs_age, max_age); /* ignore cache if aggregated isn't expected */ if (obd->obd_osfs_age < max_age || ((obd->obd_osfs.os_state & OS_STATE_SUM) && diff --git a/fs/lustre/lov/lov_obd.c b/fs/lustre/lov/lov_obd.c index 9a6ffe8..a16c663 100644 --- a/fs/lustre/lov/lov_obd.c +++ b/fs/lustre/lov/lov_obd.c @@ -1122,9 +1122,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp) continue; - /* ll_umount_begin() sets force flag but for lov, not - * osc. Let's pass it through - */ + /* ll_umount_begin() sets force on lov, pass to osc */ osc_obd = class_exp2obd(lov->lov_tgts[i]->ltd_exp); osc_obd->obd_force = obddev->obd_force; err = obd_iocontrol(cmd, lov->lov_tgts[i]->ltd_exp,