From c96fa612d5b0f3218642052c8ae1918883267c61 Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Wed, 15 Apr 2020 10:46:00 +0800 Subject: [PATCH] LU-11025 uapi: add OBD_CONNECT2_FIDMAP Add OBD_CONNECT2_FIDMAP connect flag, which indicates whether client supports FID mapping. Signed-off-by: Lai Siyao Change-Id: I165598e7d19878d1d3dcfa8c6f8fcc3cc233e4c9 Reviewed-on: https://review.whamcloud.com/38232 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev --- lustre/include/uapi/linux/lustre/lustre_idl.h | 1 + lustre/ptlrpc/wiretest.c | 2 ++ lustre/utils/wirecheck.c | 1 + lustre/utils/wiretest.c | 2 ++ 4 files changed, 6 insertions(+) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 05dd3f2..bf04057 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_CRUSH 0x2000ULL /* crush hash striped directory */ #define OBD_CONNECT2_ASYNC_DISCARD 0x4000ULL /* support async DoM data discard */ #define OBD_CONNECT2_ENCRYPT 0x8000ULL /* client-to-disk encrypt */ +#define OBD_CONNECT2_FIDMAP 0x10000ULL /* FID map */ /* XXX README XXX: * Please DO NOT add flag values here before first ensuring that this same * flag value is not in use on some other branch. Please clear any such diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index b0d40ad..998d34c 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1370,6 +1370,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_ASYNC_DISCARD); LASSERTF(OBD_CONNECT2_ENCRYPT == 0x8000ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_ENCRYPT); + LASSERTF(OBD_CONNECT2_FIDMAP== 0x10000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_FIDMAP); 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 cfebf2c..54d653b 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -622,6 +622,7 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT2_CRUSH); CHECK_DEFINE_64X(OBD_CONNECT2_ASYNC_DISCARD); CHECK_DEFINE_64X(OBD_CONNECT2_ENCRYPT); + CHECK_DEFINE_64X(OBD_CONNECT2_FIDMAP); 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 b38f1fe..0e7d314 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1402,6 +1402,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_ASYNC_DISCARD); LASSERTF(OBD_CONNECT2_ENCRYPT == 0x8000ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_ENCRYPT); + LASSERTF(OBD_CONNECT2_FIDMAP== 0x10000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_FIDMAP); 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