From: Sebastien Buisson Date: Thu, 3 Nov 2022 10:47:46 +0000 (+0100) Subject: LU-16205 sec: reserve flag for fid2path for encrypted files X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=b00112a2822aae079758d6065382733d19b72f17;p=fs%2Flustre-release.git LU-16205 sec: reserve flag for fid2path for encrypted files Reserve OBD_CONNECT2_ENCRYPT_FID2PATH connection flag for fid2path support for encrypted files. This connection flag is required so that newer servers continue to return -ENODATA to older clients. Lustre-change: https://review.whamcloud.com/49028 Lustre-commit: 6f74bb60ff6c58f4a2647556124c501100330f4c Test-Parameters: trivial Signed-off-by: Sebastien Buisson Change-Id: I505b90a061687a7ef481adacca98908c96e487be Reviewed-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49897 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 66b4c30..f26a19e 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -877,6 +877,7 @@ struct ptlrpc_body_v2 { #define OBD_CONNECT2_PCCRO 0x800000ULL /* Read-only PCC */ #define OBD_CONNECT2_ATOMIC_OPEN_LOCK 0x4000000ULL/* request lock on 1st open */ #define OBD_CONNECT2_ENCRYPT_NAME 0x8000000ULL /* name encrypt */ +#define OBD_CONNECT2_ENCRYPT_FID2PATH 0x40000000ULL /* fid2path enc file */ /* 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/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index ab0435b..e7e9e62 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -650,6 +650,9 @@ static const char *obd_connect_names[] = { "lock_contend", /* 0x2000000 */ "atomic_open_lock", /* 0x4000000 */ "name_encryption", /* 0x8000000 */ + "mkdir_replay", /* 0x10000000 */ + "dmv_inherit", /* 0x20000000 */ + "encryption_fid2path", /* 0x40000000 */ NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 28cde07..359f670 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1393,6 +1393,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_ATOMIC_OPEN_LOCK); LASSERTF(OBD_CONNECT2_ENCRYPT_NAME == 0x8000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_ENCRYPT_NAME); + LASSERTF(OBD_CONNECT2_ENCRYPT_FID2PATH == 0x40000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_ENCRYPT_FID2PATH); 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 e713a68..1bf7cbb 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -642,6 +642,7 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT2_PCCRO); CHECK_DEFINE_64X(OBD_CONNECT2_ATOMIC_OPEN_LOCK); CHECK_DEFINE_64X(OBD_CONNECT2_ENCRYPT_NAME); + CHECK_DEFINE_64X(OBD_CONNECT2_ENCRYPT_FID2PATH); 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 d03f519..f957ae6 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1429,6 +1429,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_ATOMIC_OPEN_LOCK); LASSERTF(OBD_CONNECT2_ENCRYPT_NAME == 0x8000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_ENCRYPT_NAME); + LASSERTF(OBD_CONNECT2_ENCRYPT_FID2PATH == 0x40000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_ENCRYPT_FID2PATH); LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_CRC32); LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",