From 1c7e7d1243f78c72210a0ba3c22d5c84838a416e Mon Sep 17 00:00:00 2001 From: Teddy Zheng Date: Fri, 27 Jul 2018 13:37:18 +0800 Subject: [PATCH] LU-10114 hsm: add OBD_CONNECT2_ARCHIVE_ID_ARRAY to pass archive_id lists in array Clients registed to MDS with OBD_CONNECT2_ARCHIVE_ID_ARRAY will use array to pass ARCHIVED IDs. While clients without it still use bitmap. This flag allows old clients connect to new MDSs. Test-Parameters: trivial Change-Id: I61a691fc262fdc921d5ff4aa88c1fd623f09d565 Signed-off-by: Teddy Zheng Signed-off-by: Li Xi Reviewed-on: https://review.whamcloud.com/32806 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond --- lustre/include/uapi/linux/lustre/lustre_idl.h | 1 + lustre/obdclass/lprocfs_status.c | 1 + lustre/ptlrpc/wiretest.c | 2 ++ lustre/utils/wirecheck.c | 1 + lustre/utils/wiretest.c | 2 ++ 5 files changed, 7 insertions(+) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 38adae2..14aa8dd 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -826,6 +826,7 @@ struct ptlrpc_body_v2 { #define OBD_CONNECT2_FLR 0x20ULL /* FLR support */ #define OBD_CONNECT2_WBC_INTENTS 0x40ULL /* create/unlink/... intents for wbc, also operations under client-held parent locks */ #define OBD_CONNECT2_LOCK_CONVERT 0x80ULL /* IBITS lock convert support */ +#define OBD_CONNECT2_ARCHIVE_ID_ARRAY 0x100ULL /* store HSM archive_id in array */ /* XXX README XXX: * Please DO NOT add flag values here before first ensuring that this same diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 2ff79e6..85dec3e 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -808,6 +808,7 @@ static const char *obd_connect_names[] = { "flr", /* 0x20 */ "wbc", /* 0x40 */ "lock_convert", /* 0x80 */ + "archive_id_array", /* 0x100 */ NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 3aa9b98..7f038ba 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1332,6 +1332,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_WBC_INTENTS); LASSERTF(OBD_CONNECT2_LOCK_CONVERT == 0x80ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_LOCK_CONVERT); + LASSERTF(OBD_CONNECT2_ARCHIVE_ID_ARRAY == 0x100ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_ARCHIVE_ID_ARRAY); 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 ab8be2a..c943663 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -603,6 +603,7 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT2_FLR); CHECK_DEFINE_64X(OBD_CONNECT2_WBC_INTENTS); CHECK_DEFINE_64X(OBD_CONNECT2_LOCK_CONVERT); + CHECK_DEFINE_64X(OBD_CONNECT2_ARCHIVE_ID_ARRAY); 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 cb64cd4..3b502ae 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1353,6 +1353,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_WBC_INTENTS); LASSERTF(OBD_CONNECT2_LOCK_CONVERT == 0x80ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_LOCK_CONVERT); + LASSERTF(OBD_CONNECT2_ARCHIVE_ID_ARRAY == 0x100ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_ARCHIVE_ID_ARRAY); 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