From patchwork Fri Nov 23 07:15:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7185C175A for ; Fri, 23 Nov 2018 07:19:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15AAC2B101 for ; Fri, 23 Nov 2018 07:19:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 088F72B110; Fri, 23 Nov 2018 07:19:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AF48C2B0B6 for ; Fri, 23 Nov 2018 07:18:59 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id CFFDB21F73F; Thu, 22 Nov 2018 23:18:58 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id B56BD21F647 for ; Thu, 22 Nov 2018 23:18:56 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CF9B3AC70; Fri, 23 Nov 2018 07:18:55 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:27 +1100 Message-ID: <154295732787.2850.4431010272997855706.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 1/9] lustre: obdclass: fix formating of connection flags 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 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP The current code puts the separator *only* at the start rather than *never* at the start. Signed-off-by: NeilBrown Reviewed-by: James Simmons y --- .../lustre/lustre/obdclass/lprocfs_status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index feba2ef5a3bc..acfea7a44350 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -709,14 +709,14 @@ static void obd_connect_seq_flags2str(struct seq_file *m, u64 flags, for (i = 0, mask = 1; i < 64; i++, mask <<= 1) { if (flags & mask) { seq_printf(m, "%s%s", - first ? sep : "", obd_connect_names[i]); + first ? "" : sep, obd_connect_names[i]); first = false; } } if (flags & ~(mask - 1)) { seq_printf(m, "%sunknown flags %#llx", - first ? sep : "", flags & ~(mask - 1)); + first ? "" : sep, flags & ~(mask - 1)); first = false; } From patchwork Fri Nov 23 07:15:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 176EE175A for ; Fri, 23 Nov 2018 07:19:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFC612B0B6 for ; Fri, 23 Nov 2018 07:19:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1B862BAE4; Fri, 23 Nov 2018 07:19:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C93032B0B6 for ; Fri, 23 Nov 2018 07:19:04 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 66C3621F73F; Thu, 22 Nov 2018 23:19:04 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 2D13D21F66E for ; Thu, 22 Nov 2018 23:19:03 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3C751AE0B; Fri, 23 Nov 2018 07:19:02 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:27 +1100 Message-ID: <154295732791.2850.17753016627908700130.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 2/9] lustre: remove EIOCBRETRY handling 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 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: James Simmons With linux commit 41003a7bcfed ("aio: remove retry-based AIO") AIO retry handling was removed due to it being buggy and no one using it, including lustre. Since this is the case remove EIOCBRETRY since it no longer in the kernel starting with version 3.18. Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/14507 WC-bug-id: https://jira.whamcloud.com/browse/LU-6426 Reviewed-by: Bob Glossman Reviewed-by: Dmitry Eremin Reviewed-by: Blake Caldwell Reviewed-by: Thomas Stibor Reviewed-by: Oleg Drokin Signed-off-by: NeilBrown Reviewed-by: James Simmons --- .../staging/lustre/lustre/include/lustre_errno.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_errno.h b/drivers/staging/lustre/lustre/include/lustre_errno.h index 59fbb9f47ff1..806e79672482 100644 --- a/drivers/staging/lustre/lustre/include/lustre_errno.h +++ b/drivers/staging/lustre/lustre/include/lustre_errno.h @@ -181,7 +181,6 @@ #define LUSTRE_EBADTYPE 527 /* Type not supported by server */ #define LUSTRE_EJUKEBOX 528 /* Request won't finish until timeout */ #define LUSTRE_EIOCBQUEUED 529 /* iocb queued await completion event */ -#define LUSTRE_EIOCBRETRY 530 /* iocb queued, will trigger a retry */ /* * Translations are optimized away on x86. Host errnos that shouldn't be put From patchwork Fri Nov 23 07:15:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85D15175A for ; Fri, 23 Nov 2018 07:19:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CE452B0B6 for ; Fri, 23 Nov 2018 07:19:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6133E2BAFA; Fri, 23 Nov 2018 07:19:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2AB6A2B0B6 for ; Fri, 23 Nov 2018 07:19:11 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id E6C6E21F68C; Thu, 22 Nov 2018 23:19:10 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id AD5FB21F66E for ; Thu, 22 Nov 2018 23:19:09 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CCCA5AE26; Fri, 23 Nov 2018 07:19:08 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:27 +1100 Message-ID: <154295732794.2850.5519811101627910956.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 3/9] lustre: ptlrpc: use smp unsafe at_init only for initialization 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: Vladimir Saveliev , Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Vladimir Saveliev at_init() is not smp safe, so it is not supposed to be used anywhere but in at initialization. Add at_reinit() - safe version of at_init(). Signed-off-by: Vladimir Saveliev WC-bug-id: https://jira.whamcloud.com/browse/LU-6805 Reviewed-on: http://review.whamcloud.com/15522 Reviewed-by: Andreas Dilger Reviewed-by: Chris Horn Signed-off-by: NeilBrown Reviewed-by: James Simmons --- .../staging/lustre/lustre/include/lustre_import.h | 19 +++++++++++++++++-- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index a629f6bba814..8a8a125bd130 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -331,12 +331,17 @@ static inline unsigned int at_timeout2est(unsigned int val) return (max((val << 2) / 5, 5U) - 4); } -static inline void at_reset(struct adaptive_timeout *at, int val) +static inline void at_reset_nolock(struct adaptive_timeout *at, int val) { - spin_lock(&at->at_lock); at->at_current = val; at->at_worst_ever = val; at->at_worst_time = ktime_get_real_seconds(); +} + +static inline void at_reset(struct adaptive_timeout *at, int val) +{ + spin_lock(&at->at_lock); + at_reset_nolock(at, val); spin_unlock(&at->at_lock); } @@ -348,6 +353,16 @@ static inline void at_init(struct adaptive_timeout *at, int val, int flags) at_reset(at, val); } +static inline void at_reinit(struct adaptive_timeout *at, int val, int flags) +{ + spin_lock(&at->at_lock); + at->at_binstart = 0; + memset(at->at_hist, 0, sizeof(at->at_hist)); + at->at_flags = flags; + at_reset_nolock(at, val); + spin_unlock(&at->at_lock); +} + extern unsigned int at_min; static inline int at_get(struct adaptive_timeout *at) { diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index 07dc87d9513e..480c860d066e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -1036,7 +1036,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, * The net statistics after (re-)connect is not valid anymore, * because may reflect other routing, etc. */ - at_init(&imp->imp_at.iat_net_latency, 0, 0); + at_reinit(&imp->imp_at.iat_net_latency, 0, 0); ptlrpc_at_adj_net_latency(request, lustre_msg_get_service_time(request->rq_repmsg)); From patchwork Fri Nov 23 07:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE3CF175A for ; Fri, 23 Nov 2018 07:19:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A64D12B0B6 for ; Fri, 23 Nov 2018 07:19:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B0BA2BAE4; Fri, 23 Nov 2018 07:19:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52BCC2B0B6 for ; Fri, 23 Nov 2018 07:19:18 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 054F421F68C; Thu, 22 Nov 2018 23:19:18 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 2D4E221F647 for ; Thu, 22 Nov 2018 23:19:16 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 48FE5AE0B; Fri, 23 Nov 2018 07:19:15 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:28 +1100 Message-ID: <154295732797.2850.16990175697450002727.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 4/9] lustre: rename: DNE2 should return -EXDEV upon remote rename 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: Lai Siyao , Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Lai Siyao DNE2 MDS should return -EXDEV upon remote rename, so that old client can do rename with copy and delete, instead of fail with -EREMOTE. Signed-off-by: Lai Siyao Change-Id: I68e8e99259065922f31bee5343be309380715674 WC-bug-id: https://jira.whamcloud.com/browse/LU-6660 Reviewed-on: http://review.whamcloud.com/15323 Reviewed-by: Andreas Dilger Reviewed-by: wangdi Reviewed-by: Fan Yong Signed-off-by: NeilBrown Reviewed-by: James Simmons --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 32bb9fca88c9..7e4ffeb15a63 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1945,7 +1945,7 @@ static int lmv_rename(struct obd_export *exp, struct md_op_data *op_data, } rc = md_rename(target_exp, op_data, old, oldlen, new, newlen, request); - if (rc && rc != -EREMOTE) + if (rc && rc != -EXDEV) return rc; body = req_capsule_server_get(&(*request)->rq_pill, &RMF_MDT_BODY); From patchwork Fri Nov 23 07:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BA5A16B1 for ; Fri, 23 Nov 2018 07:19:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 213D02B0B6 for ; Fri, 23 Nov 2018 07:19:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15B022BAE4; Fri, 23 Nov 2018 07:19:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CC8A82B0B6 for ; Fri, 23 Nov 2018 07:19:23 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 96E6221F6ED; Thu, 22 Nov 2018 23:19:23 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 9197521F688 for ; Thu, 22 Nov 2018 23:19:22 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B3B9DAC70; Fri, 23 Nov 2018 07:19:21 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:28 +1100 Message-ID: <154295732800.2850.8303806531168774380.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 5/9] lustre: llite: clear LLIF_FILE_RESTORING when done 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 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Bruno Faccini Clear LLIF_FILE_RESTORING if restore done to ensure to start again to glimpse new attrs. Signed-off-by: Bruno Faccini WC-bug-id: https://jira.whamcloud.com/browse/LU-6560 Reviewed-on: http://review.whamcloud.com/14609 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin Signed-off-by: NeilBrown Reviewed-by: James Simmons --- drivers/staging/lustre/lustre/llite/llite_lib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index fac65845526a..b8693049f3b6 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1905,8 +1905,14 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md) } if (body->mbo_valid & OBD_MD_TSTATE) { + /* Set LLIF_FILE_RESTORING if restore ongoing and + * clear it when done to ensure to start again + * glimpsing updated attrs + */ if (body->mbo_t_state & MS_RESTORE) set_bit(LLIF_FILE_RESTORING, &lli->lli_flags); + else + clear_bit(LLIF_FILE_RESTORING, &lli->lli_flags); } return 0; From patchwork Fri Nov 23 07:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32C4A175A for ; Fri, 23 Nov 2018 07:19:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 192D72B0B6 for ; Fri, 23 Nov 2018 07:19:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D6EE2BAE4; Fri, 23 Nov 2018 07:19:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C15C62B0B6 for ; Fri, 23 Nov 2018 07:19:31 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 7B80421F6EF; Thu, 22 Nov 2018 23:19:31 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 87CDB21F647 for ; Thu, 22 Nov 2018 23:19:29 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9AF47AE0B; Fri, 23 Nov 2018 07:19:28 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:28 +1100 Message-ID: <154295732803.2850.16198081335816276527.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 6/9] lustre: obdclass: health_check to report unhealthy upon LBUG 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 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Bruno Faccini When a LBUG has occurred, without panic_on_lbug being set, health_check /proc file must return an unhealthy state. Signed-off-by: Bruno Faccini WC-bug-id: https://jira.whamcloud.com/browse/LU-7486 Reviewed-on: http://review.whamcloud.com/17981 Reviewed-by: Bobi Jam Reviewed-by: Niu Yawei Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: NeilBrown Reviewed-by: James Simmons --- drivers/staging/lustre/lustre/obdclass/obd_sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/obd_sysfs.c b/drivers/staging/lustre/lustre/obdclass/obd_sysfs.c index 6669c235dd51..5fd30a8e2b44 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_sysfs.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_sysfs.c @@ -173,8 +173,10 @@ health_check_show(struct kobject *kobj, struct attribute *attr, char *buf) int i; size_t len = 0; - if (libcfs_catastrophe) + if (libcfs_catastrophe) { return sprintf(buf, "LBUG\n"); + healthy = false; + } read_lock(&obd_dev_lock); for (i = 0; i < class_devno_max(); i++) { From patchwork Fri Nov 23 07:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9F8718F0 for ; Fri, 23 Nov 2018 07:19:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B04672B079 for ; Fri, 23 Nov 2018 07:19:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A38372BAE4; Fri, 23 Nov 2018 07:19:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2CB352B0B6 for ; Fri, 23 Nov 2018 07:19:38 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id E80A021F6EF; Thu, 22 Nov 2018 23:19:37 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 22B0521F647 for ; Thu, 22 Nov 2018 23:19:36 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 42D0DAC70; Fri, 23 Nov 2018 07:19:35 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:28 +1100 Message-ID: <154295732806.2850.603181458106225374.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 7/9] lustre: lnet: Stop MLX5 triggering a dump_cqe 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: Doug Oucharek , Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Doug Oucharek We have found that MLX5 will trigger a dump_cqe if we don't invalidate the rkey on a newly allocated MR for FastReg usage. This fix just tags the MR as invalid on its creation if we are using FastReg and that will force it to do an invalidate of the rkey on first usage. Signed-off-by: Doug Oucharek WC-bug-id: https://jira.whamcloud.com/browse/LU-8752 Reviewed-on: https://review.whamcloud.com/24306 Reviewed-by: Dmitry Eremin Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: NeilBrown --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index ecdf4dee533d..a5eada8ee354 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -1483,7 +1483,12 @@ static int kiblnd_alloc_freg_pool(struct kib_fmr_poolset *fps, goto out_middle; } - frd->frd_valid = true; + /* + * There appears to be a bug in MLX5 code where you must + * invalidate the rkey of a new FastReg pool before first + * using it. Thus, I am marking the FRD invalid here. + */ + frd->frd_valid = false; list_add_tail(&frd->frd_list, &fpo->fast_reg.fpo_pool_list); fpo->fast_reg.fpo_pool_size++; From patchwork Fri Nov 23 07:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30B0C16B1 for ; Fri, 23 Nov 2018 07:19:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1741C2B079 for ; Fri, 23 Nov 2018 07:19:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 081FE2BAE4; Fri, 23 Nov 2018 07:19:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B07272B079 for ; Fri, 23 Nov 2018 07:19:44 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 72EA221F688; Thu, 22 Nov 2018 23:19:44 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 886B321F688 for ; Thu, 22 Nov 2018 23:19:42 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AD4D0AE26; Fri, 23 Nov 2018 07:19:41 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:28 +1100 Message-ID: <154295732808.2850.16445000176556176904.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 8/9] lustre: statahead: skip agl for the file in restoring 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: Fan Yong , Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Fan Yong In case of restore, the MDT has the right size and has already sent it back without granting the layout lock, inode is up-to-date. Then AGL (async glimpse lock) is useless. Also to glimpse we need the layout, in case of a running restore the MDT holds the layout lock so the glimpse will block up to the end of restore (statahead/agl will block). Signed-off-by: Fan Yong WC-bug-id: https://jira.whamcloud.com/browse/LU-9319 Reviewed-by: Lai Siyao Reviewed-by: Jinshan Xiong Reviewed-by: John L. Hammond Reviewed-on: https://review.whamcloud.com/26501 Reviewed-by: Oleg Drokin Signed-off-by: NeilBrown Reviewed-by: James Simmons Reviewed-by: James Simmons --- drivers/staging/lustre/lustre/llite/statahead.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index 28e85bfb9b82..3d71322aa1c7 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -504,6 +504,19 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai) return; } + /* In case of restore, the MDT has the right size and has already + * sent it back without granting the layout lock, inode is up-to-date. + * Then AGL (async glimpse lock) is useless. + * Also to glimpse we need the layout, in case of a runninh restore + * the MDT holds the layout lock so the glimpse will block up to the + * end of restore (statahead/agl will block) + */ + if (test_bit(LLIF_FILE_RESTORING, &lli->lli_flags)) { + lli->lli_agl_index = 0; + iput(inode); + return; + } + /* Someone is in glimpse (sync or async), do nothing. */ rc = down_write_trylock(&lli->lli_glimpse_sem); if (rc == 0) { From patchwork Fri Nov 23 07:15:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10695087 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C665716B1 for ; Fri, 23 Nov 2018 07:19:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACA1E2B079 for ; Fri, 23 Nov 2018 07:19:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0BB62BAE4; Fri, 23 Nov 2018 07:19:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A0E22B079 for ; Fri, 23 Nov 2018 07:19:51 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 0CF8321F6C1; Thu, 22 Nov 2018 23:19:51 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id E473321F686 for ; Thu, 22 Nov 2018 23:19:48 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0F68EAC70; Fri, 23 Nov 2018 07:19:48 +0000 (UTC) From: NeilBrown To: Andreas Dilger , James Simmons , Oleg Drokin Date: Fri, 23 Nov 2018 18:15:28 +1100 Message-ID: <154295732811.2850.6059970126126914084.stgit@noble> In-Reply-To: <154295730810.2850.961218355189474016.stgit@noble> References: <154295730810.2850.961218355189474016.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 9/9] lustre: statahead: add smp_mb() to serialize ops 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: Lai Siyao , Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Lai Siyao In ll_deauthorize_statahead(), it set thread stop flag, and then wake up thread, however wakeup is called inside spinlock in case ll_statahead_info is released, then we need to call smp_mb() to serialize setting and wakeup. Signed-off-by: Lai Siyao WC-bug-id: https://jira.whamcloud.com/browse/LU-7994 Reviewed-on: https://review.whamcloud.com/23040 Reviewed-by: Fan Yong Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: NeilBrown Reviewed-by: James Simmons --- drivers/staging/lustre/lustre/llite/statahead.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index 3d71322aa1c7..24c2335c70a7 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -1110,8 +1110,9 @@ static int ll_statahead_thread(void *arg) sa_handle_callback(sai); set_current_state(TASK_IDLE); + /* ensure we see the NULL stored by ll_deauthorize_statahead() */ if (!sa_has_callback(sai) && - sai->sai_task) + smp_load_acquire(&sai->sai_task)) schedule(); __set_current_state(TASK_RUNNING); } @@ -1191,9 +1192,17 @@ void ll_deauthorize_statahead(struct inode *dir, void *key) /* * statahead thread may not quit yet because it needs to cache * entries, now it's time to tell it to quit. + * + * In case sai is released, wake_up() is called inside spinlock, + * so we use smp_store_release() to serialize ops. */ - wake_up_process(sai->sai_task); - sai->sai_task = NULL; + struct task_struct *task = sai->sai_task; + + /* ensure ll_statahead_thread sees the NULL before + * calling schedule() again. + */ + smp_store_release(&sai->sai_task, NULL); + wake_up_process(task); } spin_unlock(&lli->lli_sa_lock); }