Whamcloud - gitweb
LU-16205 sec: reserve flag for fid2path for encrypted files 28/49028/3
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 3 Nov 2022 10:47:46 +0000 (11:47 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Dec 2022 16:07:25 +0000 (16:07 +0000)
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.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I505b90a061687a7ef481adacca98908c96e487be
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49028
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/obdclass/lprocfs_status.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 74b725b..5fb89c8 100644 (file)
@@ -841,6 +841,7 @@ struct ptlrpc_body_v2 {
 #define OBD_CONNECT2_LOCK_CONTENTION     0x2000000ULL /* contention detect */
 #define OBD_CONNECT2_ATOMIC_OPEN_LOCK    0x4000000ULL /* lock on first open */
 #define OBD_CONNECT2_ENCRYPT_NAME        0x8000000ULL /* name encrypt */
+#define OBD_CONNECT2_ENCRYPT_FID2PATH   0x40000000ULL /* fid2path enc file */
 /* XXX README XXX README XXX README XXX README XXX README XXX README XXX
  * Please DO NOT add OBD_CONNECT flags before first ensuring that this value
  * is not in use by some other branch/patch.  Email adilger@whamcloud.com
index 165281c..c61033f 100644 (file)
@@ -648,6 +648,9 @@ static const char *const obd_connect_names[] = {
        "lock_contend",                 /* 0x2000000 */
        "atomic_open_lock",             /* 0x4000000 */
        "name_encryption",              /* 0x8000000 */
+       "mkdir_replay",                 /* 0x10000000 */
+       "dmv_inherit",                  /* 0x20000000 */
+       "encryption_fid2path",          /* 0x40000000 */
        NULL
 };
 
index 7b7b3e4..f5966fe 100644 (file)
@@ -1402,6 +1402,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",
index d6d0a2b..7fbc301 100644 (file)
@@ -643,6 +643,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);
index 4ee1ad5..3be88de 100644 (file)
@@ -1428,6 +1428,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",