From b4375f5fc66cc40259673ef7cfffcc8f1c9a2ffc Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Fri, 28 Sep 2018 14:02:22 +0300 Subject: [PATCH] LU-11444 ptlrpc: Add increasing XIDs CONNECT2 flag This patch reserves the OBD_CONNECT2 flag for increasing XIDs. Change-Id: Id825ce1c86a345884c9d4cd90cd2e13839a268f0 Cray-bug-id: LUS-6272 Signed-off-by: Andriy Skulysh Reviewed-on: https://review.whamcloud.com/35113 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alexandr Boyko --- lustre/include/lu_target.h | 4 ++++ lustre/include/uapi/linux/lustre/lustre_idl.h | 1 + lustre/obdclass/lprocfs_status.c | 2 +- lustre/ptlrpc/wiretest.c | 2 ++ lustre/utils/wiretest.c | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lustre/include/lu_target.h b/lustre/include/lu_target.h index 7cafb24..dfb3dcc 100644 --- a/lustre/include/lu_target.h +++ b/lustre/include/lu_target.h @@ -398,6 +398,10 @@ static inline bool tgt_is_multimodrpcs_client(struct obd_export *exp) return exp_connect_flags(exp) & OBD_CONNECT_MULTIMODRPCS; } +static inline bool tgt_is_increasing_xid_client(struct obd_export *exp) +{ + return exp_connect_flags2(exp) & OBD_CONNECT2_INC_XID; +} /* target/tgt_handler.c */ int tgt_request_handle(struct ptlrpc_request *req); diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index e2bd6b3..4389e5d 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -834,6 +834,7 @@ struct ptlrpc_body_v2 { #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 */ +#define OBD_CONNECT2_INC_XID 0x200ULL /* Increasing xid */ #define OBD_CONNECT2_SELINUX_POLICY 0x400ULL /* has client SELinux policy */ #define OBD_CONNECT2_LSOM 0x800ULL /* LSOM support */ #define OBD_CONNECT2_PCC 0x1000ULL /* Persistent Client Cache */ diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 6f81f5d..63b28a8 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -780,7 +780,7 @@ static const char *obd_connect_names[] = { "wbc", /* 0x40 */ "lock_convert", /* 0x80 */ "archive_id_array", /* 0x100 */ - "unknown", /* 0x200 */ + "increasing_xid", /* 0x200 */ "selinux_policy", /* 0x400 */ "lsom", /* 0x800 */ "pcc", /* 0x1000 */ diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 7c949f3..6080876 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1341,6 +1341,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_LOCK_CONVERT); LASSERTF(OBD_CONNECT2_ARCHIVE_ID_ARRAY == 0x100ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_ARCHIVE_ID_ARRAY); + LASSERTF(OBD_CONNECT2_INC_XID == 0x200ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_INC_XID); LASSERTF(OBD_CONNECT2_SELINUX_POLICY == 0x400ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_SELINUX_POLICY); LASSERTF(OBD_CONNECT2_LSOM == 0x800ULL, "found 0x%.16llxULL\n", diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 9597231..ad8e89e 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1362,6 +1362,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_LOCK_CONVERT); LASSERTF(OBD_CONNECT2_ARCHIVE_ID_ARRAY == 0x100ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_ARCHIVE_ID_ARRAY); + LASSERTF(OBD_CONNECT2_INC_XID == 0x200ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_INC_XID); LASSERTF(OBD_CONNECT2_SELINUX_POLICY == 0x400ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_SELINUX_POLICY); LASSERTF(OBD_CONNECT2_LSOM == 0x800ULL, "found 0x%.16llxULL\n", -- 1.8.3.1