Whamcloud - gitweb
LU-9355 obd: remove obsolete OBD_FL_LOCAL_MASK 28/26728/5
authorWang Shilong <wshilong@ddn.com>
Wed, 19 Apr 2017 03:02:57 +0000 (11:02 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 1 May 2017 17:49:20 +0000 (17:49 +0000)
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 <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/26728
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/obdclass/obdo.c
lustre/osc/osc_request.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index b64c946..89b632c 100644 (file)
@@ -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,
 };
 
 /*
index 73075da..dddb24b 100644 (file)
@@ -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;
 
index fa08096..f68f878 100644 (file)
@@ -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,
index 00058a9..84972d6 100644 (file)
@@ -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",
index 46b0571..e480b47 100644 (file)
@@ -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
index 172d127..9dda265 100644 (file)
@@ -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",