Whamcloud - gitweb
LU-6179 llite: remove LOCKAHEAD_OLD compatibility 09/38109/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 1 Apr 2020 01:14:00 +0000 (19:14 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 6 Apr 2020 14:28:48 +0000 (14:28 +0000)
The OBD_CONNECT_LOCKAHEAD_OLD feature was added for a short time for
compatibility with an implementation of LDLM lockahead that was later
replaced by OBD_CONNECT_LOCKAHEAD2.

Remove the compatibility code for this old implementation that has
been disabled since the 2.13 release.

Also remove other obsolete compatibility code dating back to 2.8.53.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4444eff180b2c6e2b27d260413f2debbb2ce7057
Reviewed-on: https://review.whamcloud.com/38109
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lustre/include/lustre_dlm_flags.h
lustre/include/lustre_export.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/llite/dir.c
lustre/llite/llite_lib.c
lustre/ofd/ofd_dev.c
lustre/osc/osc_lock.c
lustre/ptlrpc/wiretest.c
lustre/utils/mount_lustre.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 9fdebce..1fa049d 100644 (file)
 #define ldlm_clear_converting(_l)       LDLM_CLEAR_FLAG((_l), 1ULL << 25)
 
 /**
 #define ldlm_clear_converting(_l)       LDLM_CLEAR_FLAG((_l), 1ULL << 25)
 
 /**
- * Part of original lockahead implementation, OBD_CONNECT_LOCKAHEAD_OLD.
- * Reserved temporarily to allow those implementations to keep working.
- * Will be removed after 2.12 release.
- * */
-#define LDLM_FL_LOCKAHEAD_OLD_RESERVED 0x0000000010000000ULL /* bit  28 */
-#define ldlm_is_do_not_expand_io(_l)    LDLM_TEST_FLAG((_l), 1ULL << 28)
-#define ldlm_set_do_not_expand_io(_l)   LDLM_SET_FLAG((_l), 1ULL << 28)
-#define ldlm_clear_do_not_expand_io(_l) LDLM_CLEAR_FLAG((_l), 1ULL << 28)
-
-/**
  * Do not expand this lock.  Grant it only on the extent requested.
  * Used for manually requested locks from the client (LU_LADVISE_LOCKAHEAD).
  * */
  * Do not expand this lock.  Grant it only on the extent requested.
  * Used for manually requested locks from the client (LU_LADVISE_LOCKAHEAD).
  * */
index 8f45dd4..f6e136a 100644 (file)
@@ -442,11 +442,6 @@ static inline int exp_connect_large_acl(struct obd_export *exp)
        return !!(exp_connect_flags(exp) & OBD_CONNECT_LARGE_ACL);
 }
 
        return !!(exp_connect_flags(exp) & OBD_CONNECT_LARGE_ACL);
 }
 
-static inline int exp_connect_lockahead_old(struct obd_export *exp)
-{
-       return !!(exp_connect_flags(exp) & OBD_CONNECT_LOCKAHEAD_OLD);
-}
-
 static inline int exp_connect_lockahead(struct obd_export *exp)
 {
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_LOCKAHEAD);
 static inline int exp_connect_lockahead(struct obd_export *exp)
 {
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_LOCKAHEAD);
index 2f4c083..1402fbb 100644 (file)
@@ -816,7 +816,7 @@ struct ptlrpc_body_v2 {
                                                         RPCs in parallel */
 #define OBD_CONNECT_DIR_STRIPE  0x400000000000000ULL /* striped DNE dir */
 #define OBD_CONNECT_SUBTREE    0x800000000000000ULL /* fileset mount */
                                                         RPCs in parallel */
 #define OBD_CONNECT_DIR_STRIPE  0x400000000000000ULL /* striped DNE dir */
 #define OBD_CONNECT_SUBTREE    0x800000000000000ULL /* fileset mount */
-#define OBD_CONNECT_LOCKAHEAD_OLD 0x1000000000000000ULL /* Old Cray lockahead */
+/* was OBD_CONNECT_LOCKAHEAD_OLD 0x1000000000000000ULL old lockahead 2.12-2.13*/
 
 /** bulk matchbits is sent within ptlrpc_body */
 #define OBD_CONNECT_BULK_MBITS  0x2000000000000000ULL
 
 /** bulk matchbits is sent within ptlrpc_body */
 #define OBD_CONNECT_BULK_MBITS  0x2000000000000000ULL
index c70f91d..4f54260 100644 (file)
@@ -1437,11 +1437,7 @@ out_free:
                        GOTO(lmv_out_free, rc = -EINVAL);
                }
 
                        GOTO(lmv_out_free, rc = -EINVAL);
                }
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 9, 50, 0)
-               mode = data->ioc_type != 0 ? data->ioc_type : S_IRWXUGO;
-#else
                mode = data->ioc_type;
                mode = data->ioc_type;
-#endif
                rc = ll_dir_setdirstripe(dentry, lum, lumlen, filename, mode);
 lmv_out_free:
                OBD_FREE_LARGE(buf, len);
                rc = ll_dir_setdirstripe(dentry, lum, lumlen, filename, mode);
 lmv_out_free:
                OBD_FREE_LARGE(buf, len);
index 010583b..9c4983b 100644 (file)
@@ -460,23 +460,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
                                  OBD_CONNECT_PINGLESS | OBD_CONNECT_LFSCK |
                                  OBD_CONNECT_BULK_MBITS | OBD_CONNECT_SHORTIO |
                                  OBD_CONNECT_FLAGS2 | OBD_CONNECT_GRANT_SHRINK;
                                  OBD_CONNECT_PINGLESS | OBD_CONNECT_LFSCK |
                                  OBD_CONNECT_BULK_MBITS | OBD_CONNECT_SHORTIO |
                                  OBD_CONNECT_FLAGS2 | OBD_CONNECT_GRANT_SHRINK;
-
-/* The client currently advertises support for OBD_CONNECT_LOCKAHEAD_OLD so it
- * can interoperate with an older version of lockahead which was released prior
- * to landing in master. This support will be dropped when 2.13 development
- * starts.  At the point, we should not just drop the connect flag (below), we
- * should also remove the support in the code.
- *
- * Removing it means a few things:
- * 1. Remove this section here
- * 2. Remove CEF_NONBLOCK in ll_file_lockahead()
- * 3. Remove function exp_connect_lockahead_old
- * 4. Remove LDLM_FL_LOCKAHEAD_OLD_RESERVED in lustre_dlm_flags.h
- * */
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 12, 50, 0)
-       data->ocd_connect_flags |= OBD_CONNECT_LOCKAHEAD_OLD;
-#endif
-
        data->ocd_connect_flags2 = OBD_CONNECT2_LOCKAHEAD |
                                   OBD_CONNECT2_INC_XID;
 
        data->ocd_connect_flags2 = OBD_CONNECT2_LOCKAHEAD |
                                   OBD_CONNECT2_INC_XID;
 
index cfcb420..bb60e94 100644 (file)
@@ -1740,18 +1740,8 @@ static int ofd_create_hdl(struct tgt_session_info *tsi)
 out:
        mutex_unlock(&oseq->os_create_lock);
 out_nolock:
 out:
        mutex_unlock(&oseq->os_create_lock);
 out_nolock:
-       if (rc == 0) {
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 8, 53, 0)
-               struct ofd_thread_info  *info = ofd_info(tsi->tsi_env);
-               struct lu_fid           *fid = &info->fti_fid;
-
-               /* For compatible purpose, it needs to convert back to
-                * OST ID before put it on wire. */
-               *fid = rep_oa->o_oi.oi_fid;
-               fid_to_ostid(fid, &rep_oa->o_oi);
-#endif
+       if (rc == 0)
                rep_oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP;
                rep_oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP;
-       }
        ofd_seq_put(tsi->tsi_env, oseq);
 
 out_sem:
        ofd_seq_put(tsi->tsi_env, oseq);
 
 out_sem:
index d50fddb..3370386 100644 (file)
@@ -977,7 +977,7 @@ static int osc_lock_enqueue(const struct lu_env *env,
                RETURN(0);
 
        if ((oscl->ols_flags & LDLM_FL_NO_EXPANSION) &&
                RETURN(0);
 
        if ((oscl->ols_flags & LDLM_FL_NO_EXPANSION) &&
-           !(exp_connect_lockahead_old(exp) || exp_connect_lockahead(exp))) {
+           !exp_connect_lockahead(exp)) {
                result = -EOPNOTSUPP;
                CERROR("%s: server does not support lockahead/locknoexpand: rc = %d\n",
                       exp->exp_obd->obd_name, result);
                result = -EOPNOTSUPP;
                CERROR("%s: server does not support lockahead/locknoexpand: rc = %d\n",
                       exp->exp_obd->obd_name, result);
index 8375e5a..b0d40ad 100644 (file)
@@ -1332,8 +1332,6 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_DIR_STRIPE);
        LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_SUBTREE);
                 OBD_CONNECT_DIR_STRIPE);
        LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_SUBTREE);
-       LASSERTF(OBD_CONNECT_LOCKAHEAD_OLD == 0x1000000000000000ULL, "found 0x%.16llxULL\n",
-                OBD_CONNECT_LOCKAHEAD_OLD);
        LASSERTF(OBD_CONNECT_BULK_MBITS == 0x2000000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_BULK_MBITS);
        LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",
        LASSERTF(OBD_CONNECT_BULK_MBITS == 0x2000000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_BULK_MBITS);
        LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",
index 081f0f2..7ed149c 100644 (file)
 #include "obdctl.h"
 #include "mount_utils.h"
 
 #include "obdctl.h"
 #include "mount_utils.h"
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 10, 53, 0)
-/*
- * LU-1783
- * We only #include a kernel level include file here because
- * important MS_ flag #defines are missing from the SLES version
- * of sys/mount.h
- * In the future if SLES updates sys/mount.h to have a more complete
- * set of flag #defines we should stop including linux/fs.h
- */
-#if !defined(MS_RDONLY)
-#include <linux/fs.h>
-#endif
-#endif
-
 #ifdef HAVE_LIBMOUNT
 # define WITH_LIBMOUNT "(libmount)"
 #else
 #ifdef HAVE_LIBMOUNT
 # define WITH_LIBMOUNT "(libmount)"
 #else
index e87dff7..cfebf2c 100644 (file)
@@ -603,7 +603,6 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT_MULTIMODRPCS);
        CHECK_DEFINE_64X(OBD_CONNECT_DIR_STRIPE);
        CHECK_DEFINE_64X(OBD_CONNECT_SUBTREE);
        CHECK_DEFINE_64X(OBD_CONNECT_MULTIMODRPCS);
        CHECK_DEFINE_64X(OBD_CONNECT_DIR_STRIPE);
        CHECK_DEFINE_64X(OBD_CONNECT_SUBTREE);
-       CHECK_DEFINE_64X(OBD_CONNECT_LOCKAHEAD_OLD);
        CHECK_DEFINE_64X(OBD_CONNECT_BULK_MBITS);
        CHECK_DEFINE_64X(OBD_CONNECT_OBDOPACK);
        CHECK_DEFINE_64X(OBD_CONNECT_FLAGS2);
        CHECK_DEFINE_64X(OBD_CONNECT_BULK_MBITS);
        CHECK_DEFINE_64X(OBD_CONNECT_OBDOPACK);
        CHECK_DEFINE_64X(OBD_CONNECT_FLAGS2);
index c150111..b38f1fe 100644 (file)
@@ -1364,8 +1364,6 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_DIR_STRIPE);
        LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_SUBTREE);
                 OBD_CONNECT_DIR_STRIPE);
        LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_SUBTREE);
-       LASSERTF(OBD_CONNECT_LOCKAHEAD_OLD == 0x1000000000000000ULL, "found 0x%.16llxULL\n",
-                OBD_CONNECT_LOCKAHEAD_OLD);
        LASSERTF(OBD_CONNECT_BULK_MBITS == 0x2000000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_BULK_MBITS);
        LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",
        LASSERTF(OBD_CONNECT_BULK_MBITS == 0x2000000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_BULK_MBITS);
        LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",