Whamcloud - gitweb
LU-16897 idl: add OBD_CONNECT2_SPARSE flag 04/55404/8
authorCyril Bordage <cbordage@whamcloud.com>
Mon, 26 Aug 2024 12:05:41 +0000 (14:05 +0200)
committerOleg Drokin <green@whamcloud.com>
Thu, 2 Jan 2025 20:45:53 +0000 (20:45 +0000)
This flag indicates when a client can handle sparse reads without
sending blank pages.

Test-Parameters: trivial
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I5e510deaace86558990479351074ad8f47876212
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55404
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_export.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 7e0700b..8814a21 100644 (file)
@@ -459,6 +459,11 @@ static inline int exp_connect_encrypt(struct obd_export *exp)
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_ENCRYPT);
 }
 
+static inline int exp_connect_sparse(struct obd_export *exp)
+{
+       return !!(exp_connect_flags2(exp) & OBD_CONNECT2_SPARSE);
+}
+
 static inline int exp_connect_encrypt_fid2path(struct obd_export *exp)
 {
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_ENCRYPT_FID2PATH);
index f1c9f38..7a30435 100644 (file)
@@ -845,6 +845,7 @@ struct ptlrpc_body_v2 {
  */
 #define OBD_CONNECT2_UNALIGNED_DIO     0x400000000ULL /* unaligned DIO */
 #define OBD_CONNECT2_CONN_POLICY       0x800000000ULL /* server-side connection policy */
+#define OBD_CONNECT2_SPARSE            0x1000000000ULL /* sparse LNet read */
 #define OBD_CONNECT2_MIRROR_ID_FIX     0x2000000000ULL /* rr_mirror_id move */
 #define OBD_CONNECT2_UPDATE_LAYOUT     0x4000000000ULL /* update compressibility */
 /* XXX README XXX README XXX README XXX README XXX README XXX README XXX
index 96ca9af..cfbed5a 100644 (file)
@@ -1467,6 +1467,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_UNALIGNED_DIO);
        LASSERTF(OBD_CONNECT2_CONN_POLICY == 0x800000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_CONN_POLICY);
+       LASSERTF(OBD_CONNECT2_SPARSE == 0x1000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_SPARSE);
        LASSERTF(OBD_CONNECT2_MIRROR_ID_FIX == 0x2000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_MIRROR_ID_FIX);
        LASSERTF(OBD_CONNECT2_UPDATE_LAYOUT == 0x4000000000ULL, "found 0x%.16llxULL\n",
index e5a5e37..9661947 100644 (file)
@@ -703,6 +703,7 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT2_COMPRESS);
        CHECK_DEFINE_64X(OBD_CONNECT2_UNALIGNED_DIO);
        CHECK_DEFINE_64X(OBD_CONNECT2_CONN_POLICY);
+       CHECK_DEFINE_64X(OBD_CONNECT2_SPARSE);
        CHECK_DEFINE_64X(OBD_CONNECT2_MIRROR_ID_FIX);
        CHECK_DEFINE_64X(OBD_CONNECT2_UPDATE_LAYOUT);
 
index 846b0f2..cc51138 100644 (file)
@@ -1492,6 +1492,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_UNALIGNED_DIO);
        LASSERTF(OBD_CONNECT2_CONN_POLICY == 0x800000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_CONN_POLICY);
+       LASSERTF(OBD_CONNECT2_SPARSE == 0x1000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_SPARSE);
        LASSERTF(OBD_CONNECT2_MIRROR_ID_FIX == 0x2000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_MIRROR_ID_FIX);
        LASSERTF(OBD_CONNECT2_UPDATE_LAYOUT == 0x4000000000ULL, "found 0x%.16llxULL\n",