From: Patrick Farrell Date: Tue, 23 Apr 2019 16:43:09 +0000 (-0400) Subject: LU-9846 obd: Add overstriping CONNECT flag X-Git-Tag: 2.12.54~108 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5d085745af43bd15e6b7ea728491600411833b2a LU-9846 obd: Add overstriping CONNECT flag 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. Signed-off-by: Patrick Farrell Change-Id: I5d7c8f30d16cc2541d3202582fe55177022ccede Reviewed-on: https://review.whamcloud.com/34743 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Mike Pershin --- diff --git a/lustre/include/lustre_export.h b/lustre/include/lustre_export.h index 5cf29e1..83e3bbe 100644 --- a/lustre/include/lustre_export.h +++ b/lustre/include/lustre_export.h @@ -449,6 +449,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/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 28e008d..73b5cd2 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -829,6 +829,7 @@ struct ptlrpc_body_v2 { #define OBD_CONNECT2_LOCKAHEAD 0x2ULL /* ladvise lockahead 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 under client-held parent locks */ #define OBD_CONNECT2_LOCK_CONVERT 0x80ULL /* IBITS lock convert support */ @@ -887,10 +888,11 @@ struct ptlrpc_body_v2 { OBD_CONNECT_GRANT_PARAM | \ OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2) -#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | OBD_CONNECT2_FLR | \ - OBD_CONNECT2_SUM_STATFS | \ - OBD_CONNECT2_LOCK_CONVERT | \ +#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | \ OBD_CONNECT2_DIR_MIGRATE | \ + OBD_CONNECT2_SUM_STATFS | \ + OBD_CONNECT2_FLR |\ + OBD_CONNECT2_LOCK_CONVERT | \ OBD_CONNECT2_ARCHIVE_ID_ARRAY | \ OBD_CONNECT2_SELINUX_POLICY | \ OBD_CONNECT2_LSOM) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index b3b35ebc..273af31 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -224,10 +224,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/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 2ea931e..aa2925a 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -776,8 +776,8 @@ static const char *obd_connect_names[] = { "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/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index c4fa761..deda48f 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1328,6 +1328,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/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 0fd443d..ae8cf00 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -601,6 +601,8 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT2_FILE_SECCTX); CHECK_DEFINE_64X(OBD_CONNECT2_LOCKAHEAD); CHECK_DEFINE_64X(OBD_CONNECT2_DIR_MIGRATE); + CHECK_DEFINE_64X(OBD_CONNECT2_SUM_STATFS); + CHECK_DEFINE_64X(OBD_CONNECT2_OVERSTRIPING); CHECK_DEFINE_64X(OBD_CONNECT2_FLR); CHECK_DEFINE_64X(OBD_CONNECT2_WBC_INTENTS); CHECK_DEFINE_64X(OBD_CONNECT2_LOCK_CONVERT); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index d220aa1..e7edcad 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1350,6 +1350,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",