From f024aabf8bbf797e101eec5ff054f7a6e3d253ed Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 2 May 2018 03:03:38 -0400 Subject: [PATCH] LU-10938 ptlrpc: Add WBC connect flag It denotes ability of the node to understand additional types of intent requests, exclusive metadata locks issued to clients and server operations performed under such locks while still held by clients. Test-Parameters: trivial Change-Id: I72c1ddfdf94edea3b357d82da6c410bc2d79a75c Signed-off-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/32241 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin --- lustre/include/uapi/linux/lustre/lustre_idl.h | 1 + lustre/obdclass/lprocfs_status.c | 1 + lustre/ptlrpc/wiretest.c | 2 ++ lustre/utils/wirecheck.c | 1 + lustre/utils/wiretest.c | 2 ++ 5 files changed, 7 insertions(+) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index b2423fc..8e77f31 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -807,6 +807,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_FLR 0x20ULL /* FLR support */ +#define OBD_CONNECT2_WBC_INTENTS 0x40ULL /* create/unlink/... intents for wbc, also operations under client-held parent locks */ /* XXX README XXX: * Please DO NOT add flag values here before first ensuring that this same diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 7a202e2..1c30d87 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -806,6 +806,7 @@ static const char *obd_connect_names[] = { "unknown", /* 0x08 */ "unknown", /* 0x10 */ "flr", /* 0x20 */ + "wbc", /* 0x40 */ NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 0e4321a..fc97377 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1306,6 +1306,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_DIR_MIGRATE); LASSERTF(OBD_CONNECT2_FLR == 0x20ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_FLR); + LASSERTF(OBD_CONNECT2_WBC_INTENTS == 0x40ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_WBC_INTENTS); LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_CRC32); LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index d43eea0..8816d02 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -589,6 +589,7 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT2_LOCKAHEAD); CHECK_DEFINE_64X(OBD_CONNECT2_DIR_MIGRATE); CHECK_DEFINE_64X(OBD_CONNECT2_FLR); + CHECK_DEFINE_64X(OBD_CONNECT2_WBC_INTENTS); CHECK_VALUE_X(OBD_CKSUM_CRC32); CHECK_VALUE_X(OBD_CKSUM_ADLER); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 6e5193e..8661cdf 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1327,6 +1327,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_DIR_MIGRATE); LASSERTF(OBD_CONNECT2_FLR == 0x20ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_FLR); + LASSERTF(OBD_CONNECT2_WBC_INTENTS == 0x40ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_WBC_INTENTS); LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_CRC32); LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n", -- 1.8.3.1