From patchwork Thu Feb 27 21:12:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11410109 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 75408138D for ; Thu, 27 Feb 2020 21:30:28 +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 5C678246A0 for ; Thu, 27 Feb 2020 21:30:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C678246A0 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 A5CF034962C; Thu, 27 Feb 2020 13:26:00 -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 712FF21FE20 for ; Thu, 27 Feb 2020 13:19:42 -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 8F39B8A27; Thu, 27 Feb 2020 16:18:16 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 8C86B468; Thu, 27 Feb 2020 16:18:16 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 27 Feb 2020 16:12:23 -0500 Message-Id: <1582838290-17243-276-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 275/622] lustre: obd: Add overstriping CONNECT flag 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: Patrick Farrell This patch reserves the OBD_CONNECT flag for overstriping, and also does some cleanup of OBD_CONNECT flags, putting them in the correct order and adding some missing ones in proc and the wire{test,check} checks. WC-bug-id: https://jira.whamcloud.com/browse/LU-9846 Lustre-commit: 5d085745af43 ("LU-9846 obd: Add overstriping CONNECT flag") Signed-off-by: Patrick Farrell Reviewed-on: https://review.whamcloud.com/34743 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Signed-off-by: James Simmons --- fs/lustre/include/lustre_export.h | 5 +++++ fs/lustre/llite/llite_lib.c | 6 +++--- fs/lustre/obdclass/lprocfs_status.c | 4 ++-- fs/lustre/ptlrpc/wiretest.c | 4 ++++ include/uapi/linux/lustre/lustre_idl.h | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/fs/lustre/include/lustre_export.h b/fs/lustre/include/lustre_export.h index c94efb0..967ce37 100644 --- a/fs/lustre/include/lustre_export.h +++ b/fs/lustre/include/lustre_export.h @@ -264,6 +264,11 @@ static inline int exp_connect_lockahead(struct obd_export *exp) return !!(exp_connect_flags2(exp) & OBD_CONNECT2_LOCKAHEAD); } +static inline int exp_connect_overstriping(struct obd_export *exp) +{ + return !!(exp_connect_flags2(exp) & OBD_CONNECT2_OVERSTRIPING); +} + static inline int exp_connect_flr(struct obd_export *exp) { return !!(exp_connect_flags2(exp) & OBD_CONNECT2_FLR); diff --git a/fs/lustre/llite/llite_lib.c b/fs/lustre/llite/llite_lib.c index 8e5cf0a..fd19035 100644 --- a/fs/lustre/llite/llite_lib.c +++ b/fs/lustre/llite/llite_lib.c @@ -212,10 +212,10 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt) OBD_CONNECT_GRANT_PARAM | OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2; - data->ocd_connect_flags2 = OBD_CONNECT2_FLR | - OBD_CONNECT2_LOCK_CONVERT | - OBD_CONNECT2_DIR_MIGRATE | + data->ocd_connect_flags2 = OBD_CONNECT2_DIR_MIGRATE | OBD_CONNECT2_SUM_STATFS | + OBD_CONNECT2_FLR | + OBD_CONNECT2_LOCK_CONVERT | OBD_CONNECT2_ARCHIVE_ID_ARRAY | OBD_CONNECT2_LSOM; diff --git a/fs/lustre/obdclass/lprocfs_status.c b/fs/lustre/obdclass/lprocfs_status.c index a7c274a..55057cf 100644 --- a/fs/lustre/obdclass/lprocfs_status.c +++ b/fs/lustre/obdclass/lprocfs_status.c @@ -114,8 +114,8 @@ "file_secctx", /* 0x01 */ "lockaheadv2", /* 0x02 */ "dir_migrate", /* 0x04 */ - "unknown", /* 0x08 */ - "unknown", /* 0x10 */ + "sum_statfs", /* 0x08 */ + "overstriping", /* 0x10 */ "flr", /* 0x20 */ "wbc", /* 0x40 */ "lock_convert", /* 0x80 */ diff --git a/fs/lustre/ptlrpc/wiretest.c b/fs/lustre/ptlrpc/wiretest.c index 4a268f6..fb57def 100644 --- a/fs/lustre/ptlrpc/wiretest.c +++ b/fs/lustre/ptlrpc/wiretest.c @@ -1136,6 +1136,10 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_LOCKAHEAD); LASSERTF(OBD_CONNECT2_DIR_MIGRATE == 0x4ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_DIR_MIGRATE); + LASSERTF(OBD_CONNECT2_SUM_STATFS == 0x8ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_SUM_STATFS); + LASSERTF(OBD_CONNECT2_OVERSTRIPING == 0x10ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_OVERSTRIPING); LASSERTF(OBD_CONNECT2_FLR == 0x20ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_FLR); LASSERTF(OBD_CONNECT2_WBC_INTENTS == 0x40ULL, "found 0x%.16llxULL\n", diff --git a/include/uapi/linux/lustre/lustre_idl.h b/include/uapi/linux/lustre/lustre_idl.h index 3a2a093..bba3a77 100644 --- a/include/uapi/linux/lustre/lustre_idl.h +++ b/include/uapi/linux/lustre/lustre_idl.h @@ -797,6 +797,7 @@ struct ptlrpc_body_v2 { #define OBD_CONNECT2_DIR_MIGRATE 0x4ULL /* migrate striped dir */ #define OBD_CONNECT2_SUM_STATFS 0x8ULL /* MDT return aggregated stats */ +#define OBD_CONNECT2_OVERSTRIPING 0x10ULL /* OST overstriping support */ #define OBD_CONNECT2_FLR 0x20ULL /* FLR support */ #define OBD_CONNECT2_WBC_INTENTS 0x40ULL /* create/unlink/... intents * for wbc, also operations