Whamcloud - gitweb
LU-10911 idl: add OBD_CONNECT2_FLR_EC flag 43/58843/4
authorJames Simmons <jsimmons@infradead.org>
Tue, 22 Apr 2025 19:47:14 +0000 (15:47 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 7 May 2025 21:13:01 +0000 (21:13 +0000)
The new connect2 flag indicates when I/O data containing
parity data can be handled. The field l_ost_gen for
struct lov_ost_data_v1 has never been used. We can use
it to classify OST object data.

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

index afdc282..630ef5e 100644 (file)
@@ -456,6 +456,11 @@ static inline int exp_connect_flr(struct obd_export *exp)
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_FLR);
 }
 
+static inline int exp_connect_parity(struct obd_export *exp)
+{
+       return !!(exp_connect_flags2(exp) & OBD_CONNECT2_FLR_EC);
+}
+
 static inline int exp_connect_lock_convert(struct obd_export *exp)
 {
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_LOCK_CONVERT);
index a686c44..cc59756 100644 (file)
@@ -850,7 +850,7 @@ struct ptlrpc_body_v2 {
 #define OBD_CONNECT2_MIRROR_ID_FIX     0x2000000000ULL /* rr_mirror_id move */
 #define OBD_CONNECT2_UPDATE_LAYOUT     0x4000000000ULL /* update compressibility */
 #define OBD_CONNECT2_READDIR_OPEN      0x8000000000ULL /* read first dir page on open */
-
+#define OBD_CONNECT2_FLR_EC           0x10000000000ULL /* parity support */
 /* 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
@@ -1232,7 +1232,10 @@ enum obdo_flags {
 #define lov_ost_data lov_ost_data_v1
 struct lov_ost_data_v1 {          /* per-stripe data structure (little-endian)*/
        struct ost_id l_ost_oi;   /* OST object ID */
-       __u32 l_ost_gen;          /* generation of this l_ost_idx */
+       union {
+               __u32 l_ost_type; /* type of data stored in OST object */
+               __u32 l_ost_gen;  /* generation of this l_ost_idx */
+       };
        __u32 l_ost_idx;          /* OST index in LOV (lov_tgt_desc->tgts) */
 };
 
index 0f4595a..8215779 100644 (file)
@@ -886,7 +886,10 @@ static inline bool lov_pool_is_reserved(const char *pool)
 #define lov_user_ost_data lov_user_ost_data_v1
 struct lov_user_ost_data_v1 {     /* per-stripe data structure */
        struct ost_id l_ost_oi;   /* OST object ID */
-       __u32 l_ost_gen;          /* generation of this OST index */
+       union {
+               __u32 l_ost_type; /* type of data stored in OST object */
+               __u32 l_ost_gen;  /* generation of this OST index */
+       };
        __u32 l_ost_idx;          /* OST index in LOV */
 } __attribute__((packed));
 
index 7370153..1a00a5e 100644 (file)
@@ -728,6 +728,7 @@ static const char *const obd_connect_names[] = {
        "mirror_id_fix",               /* 0x2000000000 */
        "update_layout",               /* 0x4000000000 */
        "readdir_open",                /* 0x8000000000 */
+       "flr_ec",                       /* 0x1000000000 */
        NULL
 };
 
index 1b9e885..02668ee 100644 (file)
@@ -1455,6 +1455,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_MIRROR_ID_FIX);
        LASSERTF(OBD_CONNECT2_UPDATE_LAYOUT == 0x4000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_UPDATE_LAYOUT);
+       LASSERTF(OBD_CONNECT2_FLR_EC == 0x10000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_FLR_EC);
 
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
index 14a594e..1851355 100644 (file)
@@ -706,6 +706,7 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT2_SPARSE);
        CHECK_DEFINE_64X(OBD_CONNECT2_MIRROR_ID_FIX);
        CHECK_DEFINE_64X(OBD_CONNECT2_UPDATE_LAYOUT);
+       CHECK_DEFINE_64X(OBD_CONNECT2_FLR_EC);
 
        BLANK_LINE();
        CHECK_VALUE_X(OBD_CKSUM_CRC32);
index 18881a2..bc4a232 100644 (file)
@@ -1500,6 +1500,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_MIRROR_ID_FIX);
        LASSERTF(OBD_CONNECT2_UPDATE_LAYOUT == 0x4000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_UPDATE_LAYOUT);
+       LASSERTF(OBD_CONNECT2_FLR_EC == 0x10000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_FLR_EC);
 
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);