From 91f6eff60f279a41e4d7869da5736cb2ac67868a Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Wed, 19 Apr 2017 11:02:57 +0800 Subject: [PATCH] LU-9355 obd: remove obsolete OBD_FL_LOCAL_MASK From Andreas Dilger: The OBD_FL_LOCAL_MASK support has not been used since commit e62f0a3c5b9 b=21980 cache ll_obdo_cache: Can't free all objects which predates Jira. With the landing of patch https://review.whamcloud.com/26463 LU-4017 quota: add project inherit attributes the handling of the "local" flags is broken and since it is unused it is better to be removed entirely. Change-Id: Iebd3de73f78f72851c5a664e72fa3d145729e1d6 Signed-off-by: Wang Shilong Reviewed-on: https://review.whamcloud.com/26728 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Andreas Dilger --- lustre/include/lustre/lustre_idl.h | 12 +++++------- lustre/obdclass/obdo.c | 11 ----------- lustre/osc/osc_request.c | 5 ++--- lustre/ptlrpc/wiretest.c | 1 - lustre/utils/wirecheck.c | 1 - lustre/utils/wiretest.c | 1 - 6 files changed, 7 insertions(+), 24 deletions(-) diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index b64c946..89b632c 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -993,14 +993,12 @@ enum obdo_flags { OBD_FL_NOSPC_BLK = 0x00100000, /* no more block space on OST */ OBD_FL_FLUSH = 0x00200000, /* flush pages on the OST */ OBD_FL_SHORT_IO = 0x00400000, /* short io request */ + /* OBD_FL_LOCAL_MASK = 0xF0000000, was local-only flags until 2.10 */ - /* Note that while these checksum values are currently separate bits, - * in 2.x we can actually allow all values from 1-31 if we wanted. */ - OBD_FL_CKSUM_ALL = OBD_FL_CKSUM_CRC32 | OBD_FL_CKSUM_ADLER | - OBD_FL_CKSUM_CRC32C, - - /* mask for local-only flag, which won't be sent over network */ - OBD_FL_LOCAL_MASK = 0xF0000000, + /* Note that while these checksum values are currently separate bits, + * in 2.x we can actually allow all values from 1-31 if we wanted. */ + OBD_FL_CKSUM_ALL = OBD_FL_CKSUM_CRC32 | OBD_FL_CKSUM_ADLER | + OBD_FL_CKSUM_CRC32C, }; /* diff --git a/lustre/obdclass/obdo.c b/lustre/obdclass/obdo.c index 73075da..dddb24b 100644 --- a/lustre/obdclass/obdo.c +++ b/lustre/obdclass/obdo.c @@ -182,7 +182,6 @@ void lustre_set_wire_obdo(const struct obd_connect_data *ocd, const struct obdo *lobdo) { *wobdo = *lobdo; - wobdo->o_flags &= ~OBD_FL_LOCAL_MASK; if (ocd == NULL) return; @@ -203,17 +202,7 @@ void lustre_get_wire_obdo(const struct obd_connect_data *ocd, struct obdo *lobdo, const struct obdo *wobdo) { - __u32 local_flags = 0; - - if (lobdo->o_valid & OBD_MD_FLFLAGS) - local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK; - *lobdo = *wobdo; - if (local_flags != 0) { - lobdo->o_valid |= OBD_MD_FLFLAGS; - lobdo->o_flags &= ~OBD_FL_LOCAL_MASK; - lobdo->o_flags |= local_flags; - } if (ocd == NULL) return; diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index fa08096..f68f878 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1257,10 +1257,9 @@ osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa, * it can be changed via lprocfs */ cksum_type_t cksum_type = cli->cl_cksum_type; - if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0) { - oa->o_flags &= OBD_FL_LOCAL_MASK; + if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0) body->oa.o_flags = 0; - } + body->oa.o_flags |= cksum_type_pack(cksum_type); body->oa.o_valid |= OBD_MD_FLCKSUM | OBD_MD_FLFLAGS; body->oa.o_cksum = osc_checksum_bulk(requested_nob, diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 00058a9..84972d6 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1508,7 +1508,6 @@ void lustre_assert_wire_constants(void) CLASSERT(OBD_FL_NOSPC_BLK == 0x00100000); CLASSERT(OBD_FL_FLUSH == 0x00200000); CLASSERT(OBD_FL_SHORT_IO == 0x00400000); - CLASSERT(OBD_FL_LOCAL_MASK == 0xf0000000); /* Checks for struct lov_ost_data_v1 */ LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, "found %lld\n", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 46b0571..e480b47 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -717,7 +717,6 @@ check_obdo(void) CHECK_CVALUE_X(OBD_FL_NOSPC_BLK); CHECK_CVALUE_X(OBD_FL_FLUSH); CHECK_CVALUE_X(OBD_FL_SHORT_IO); - CHECK_CVALUE_X(OBD_FL_LOCAL_MASK); } static void diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 172d127..9dda265 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1526,7 +1526,6 @@ void lustre_assert_wire_constants(void) CLASSERT(OBD_FL_NOSPC_BLK == 0x00100000); CLASSERT(OBD_FL_FLUSH == 0x00200000); CLASSERT(OBD_FL_SHORT_IO == 0x00400000); - CLASSERT(OBD_FL_LOCAL_MASK == 0xf0000000); /* Checks for struct lov_ost_data_v1 */ LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, "found %lld\n", -- 1.8.3.1