From: Andreas Dilger Date: Wed, 6 Jun 2018 20:41:13 +0000 (-0600) Subject: LU-10855 ptlrpc: remove obsolete OBD RPC opcodes X-Git-Tag: 2.11.53~13 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F32651%2F3;p=fs%2Flustre-release.git LU-10855 ptlrpc: remove obsolete OBD RPC opcodes Remove the obsolete OBD_LOG_CANCEL (since Lustre 1.5) and OBD_QC_CALLBACK (since Lustre 2.4) RPC opcodes. Assign OBD_IDX_READ an explicit opcode (as should be done with all enums in lustre_idl.h) so that the value does not change if some prior field is removed. Also remove the OBD_FAIL checks that were used to test them. The setting in conf_sanity.sh test_58 was unused for many years. Test-Parameters: trivial testlist=conf-sanity Signed-off-by: Andreas Dilger Change-Id: Ie68c6be0da1c114fc981cb4b1afdcdb7c13ebbe5 Reviewed-on: https://review.whamcloud.com/32651 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index db8378b..cc9ec19 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -431,12 +431,12 @@ extern char obd_jobid_var[]; #define OBD_FAIL_PTLRPC_BULK_ATTACH 0x521 #define OBD_FAIL_OBD_PING_NET 0x600 -#define OBD_FAIL_OBD_LOG_CANCEL_NET 0x601 +/* OBD_FAIL_OBD_LOG_CANCEL_NET 0x601 obsolete since 1.5 */ #define OBD_FAIL_OBD_LOGD_NET 0x602 /* OBD_FAIL_OBD_QC_CALLBACK_NET 0x603 obsolete since 2.4 */ #define OBD_FAIL_OBD_DQACQ 0x604 #define OBD_FAIL_OBD_LLOG_SETUP 0x605 -#define OBD_FAIL_OBD_LOG_CANCEL_REP 0x606 +/* OBD_FAIL_OBD_LOG_CANCEL_REP 0x606 obsolete since 1.5 */ #define OBD_FAIL_OBD_IDX_READ_NET 0x607 #define OBD_FAIL_OBD_IDX_READ_BREAK 0x608 #define OBD_FAIL_OBD_NO_LRU 0x609 diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 7999816..a7ce930 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -2557,13 +2557,13 @@ struct cfg_marker { * Opcodes for multiple servers. */ enum obd_cmd { - OBD_PING = 400, - OBD_LOG_CANCEL, /* Obsolete since 1.5. */ - OBD_QC_CALLBACK, /* not used since 2.4 */ - OBD_IDX_READ, - OBD_LAST_OPC + OBD_PING = 400, +/* OBD_LOG_CANCEL = 401, obsolete since 1.5 */ +/* OBD_QC_CALLBACK = 402, obsolete since 2.4 */ + OBD_IDX_READ = 403, + OBD_LAST_OPC, + OBD_FIRST_OPC = OBD_PING }; -#define OBD_FIRST_OPC OBD_PING /** * llog contexts indices. diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c index 89d256d..dac0942 100644 --- a/lustre/ptlrpc/lproc_ptlrpc.c +++ b/lustre/ptlrpc/lproc_ptlrpc.c @@ -109,10 +109,10 @@ static struct ll_rpc_opcode { { MGS_TARGET_DEL, "mgs_target_del" }, { MGS_SET_INFO, "mgs_set_info" }, { MGS_CONFIG_READ, "mgs_config_read" }, - { OBD_PING, "obd_ping" }, - { OBD_LOG_CANCEL, "llog_cancel" }, - { OBD_QC_CALLBACK, "obd_quota_callback" }, - { OBD_IDX_READ, "dt_index_read" }, + { OBD_PING, "obd_ping" }, + { 401, /* was OBD_LOG_CANCEL */ "llog_cancel" }, + { 402, /* was OBD_QC_CALLBACK */ "obd_quota_callback" }, + { OBD_IDX_READ, "dt_index_read" }, { LLOG_ORIGIN_HANDLE_CREATE, "llog_origin_handle_open" }, { LLOG_ORIGIN_HANDLE_NEXT_BLOCK, "llog_origin_handle_next_block" }, { LLOG_ORIGIN_HANDLE_READ_HEADER,"llog_origin_handle_read_header" }, diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index e44d933..9aa4553 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -338,10 +338,6 @@ void lustre_assert_wire_constants(void) CLASSERT(LQUOTA_RES_DT == 2); LASSERTF(OBD_PING == 400, "found %lld\n", (long long)OBD_PING); - LASSERTF(OBD_LOG_CANCEL == 401, "found %lld\n", - (long long)OBD_LOG_CANCEL); - LASSERTF(OBD_QC_CALLBACK == 402, "found %lld\n", - (long long)OBD_QC_CALLBACK); LASSERTF(OBD_IDX_READ == 403, "found %lld\n", (long long)OBD_IDX_READ); LASSERTF(OBD_LAST_OPC == 404, "found %lld\n", diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 10408d5..aa6c654 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -4376,9 +4376,6 @@ test_58() { # bug 22658 setup_noconfig mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed" createmany -o $DIR/$tdir/$tfile-%d 100 - # make sure that OSTs do not cancel llog cookies before we unmount the MDS -#define OBD_FAIL_OBD_LOG_CANCEL_NET 0x601 - do_facet $SINGLEMDS "$LCTL set_param fail_loc=0x601" unlinkmany $DIR/$tdir/$tfile-%d 100 stop_mds || error "Unable to stop MDS" diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 72151df..178fc8f 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -2703,8 +2703,6 @@ main(int argc, char **argv) CHECK_CVALUE(LQUOTA_RES_DT); CHECK_VALUE(OBD_PING); - CHECK_VALUE(OBD_LOG_CANCEL); - CHECK_VALUE(OBD_QC_CALLBACK); CHECK_VALUE(OBD_IDX_READ); CHECK_VALUE(OBD_LAST_OPC); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 0264979..a83a3db 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -359,10 +359,6 @@ void lustre_assert_wire_constants(void) CLASSERT(LQUOTA_RES_DT == 2); LASSERTF(OBD_PING == 400, "found %lld\n", (long long)OBD_PING); - LASSERTF(OBD_LOG_CANCEL == 401, "found %lld\n", - (long long)OBD_LOG_CANCEL); - LASSERTF(OBD_QC_CALLBACK == 402, "found %lld\n", - (long long)OBD_QC_CALLBACK); LASSERTF(OBD_IDX_READ == 403, "found %lld\n", (long long)OBD_IDX_READ); LASSERTF(OBD_LAST_OPC == 404, "found %lld\n",