Whamcloud - gitweb
LU-4217 build: bump build version warnings to x.y.53 30/8630/8
authorAndreas Dilger <andreas.dilger@intel.com>
Thu, 19 Dec 2013 23:24:00 +0000 (07:24 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 30 Aug 2014 01:27:55 +0000 (01:27 +0000)
Move the LUSTRE_VERSION_CODE checks to trigger on x.y.53 instead of
x.y.50, so that it is into the development cycle that they are hit
instead of right at the start.
In many cases, the #warning has been removed (to prevent build errors)
and instead the code is just disabled outright.  The dead code can be
seen easily and removed in the future with less interruption to the
development process.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Iae310f66557be5e250c79c216e002c6c5165b09e
Reviewed-on: http://review.whamcloud.com/8630
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
22 files changed:
lustre/include/lustre_import.h
lustre/include/lustre_net.h
lustre/include/obd.h
lustre/ldlm/ldlm_lib.c
lustre/llite/dir.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_nids.c
lustre/obdclass/obd_mount.c
lustre/ofd/ofd_objects.c
lustre/osd-ldiskfs/osd_quota.c
lustre/osd-ldiskfs/osd_quota_fmt.c
lustre/osd-zfs/osd_index.c
lustre/ptlrpc/import.c
lustre/ptlrpc/layout.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/sec_null.c
lustre/quota/lquota_disk.c
lustre/quota/lquota_lib.c
lustre/utils/lustre_cfg.c
lustre/utils/mount_lustre.c

index a582f48..f4a7b90 100644 (file)
@@ -289,8 +289,10 @@ struct obd_import {
                                  imp_resend_replay:1,
                                  /* disable normal recovery, for test only. */
                                  imp_no_pinger_recover:1,
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0)
                                  /* need IR MNE swab */
                                  imp_need_mne_swab:1,
+#endif
                                  /* import must be reconnected instead of
                                   * chouse new connection */
                                  imp_force_reconnect:1,
index 556284b..99218e2 100644 (file)
@@ -3168,10 +3168,9 @@ __u32 lustre_msg_get_timeout(struct lustre_msg *msg);
 __u32 lustre_msg_get_service_time(struct lustre_msg *msg);
 char *lustre_msg_get_jobid(struct lustre_msg *msg);
 __u32 lustre_msg_get_cksum(struct lustre_msg *msg);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
 __u32 lustre_msg_calc_cksum(struct lustre_msg *msg, int compat18);
 #else
-# warning "remove checksum compatibility support for b1_8"
 __u32 lustre_msg_calc_cksum(struct lustre_msg *msg);
 #endif
 void lustre_msg_set_handle(struct lustre_msg *msg,struct lustre_handle *handle);
index 4303c3c..61f53be 100644 (file)
@@ -330,7 +330,7 @@ struct client_obd {
        /* used by quotacheck when the servers are older than 2.4 */
        int                      cl_qchk_stat; /* quotacheck stat of the peer */
 #define CL_NOT_QUOTACHECKED 1   /* client->cl_qchk_stat init value */
-#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 7, 50, 0)
+#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 7, 53, 0)
 #warning "please consider removing quotacheck compatibility code"
 #endif
 
index da8762c..99b21dc 100644 (file)
@@ -1060,7 +1060,7 @@ dont_check_exports:
         if (rc)
                 GOTO(out, rc);
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 52, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
        /* 2.2.0 clients always swab nidtbl entries due to a bug, so server
         * will do the swabbing for if the client is using the same endianness.
         *
@@ -1070,8 +1070,6 @@ dont_check_exports:
         * will never do MNE swabbing, let the client handle that.  LU-1644 */
        export->exp_need_mne_swab = !ptlrpc_req_need_swab(req) &&
                        !(data->ocd_connect_flags & OBD_CONNECT_MNE_SWAB);
-#else
-#warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and exp_need_mne_swab"
 #endif
 
         LASSERT(target->u.obt.obt_magic == OBT_MAGIC);
index 0233cce..6e1a005 100644 (file)
@@ -1522,7 +1522,7 @@ out_rmdir:
                 OBD_FREE_PTR(check);
                 RETURN(rc);
         }
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
         case LL_IOC_QUOTACTL_18: {
                 /* copy the old 1.x quota struct for internal use, then copy
                  * back into old format struct.  For 1.8 compatibility. */
@@ -1573,9 +1573,7 @@ out_rmdir:
                 OBD_FREE_PTR(qctl_18);
                 RETURN(rc);
         }
-#else
-#warning "remove old LL_IOC_QUOTACTL_18 compatibility code"
-#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0) */
+#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0) */
        case OBD_IOC_QUOTACTL: {
                 struct if_quotactl *qctl;
 
index c00f986..3c3def7 100644 (file)
@@ -1567,23 +1567,21 @@ static inline void d_lustre_revalidate(struct dentry *dentry)
        spin_unlock(&dentry->d_lock);
 }
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
 /* Compatibility for old (1.8) compiled userspace quota code */
 struct if_quotactl_18 {
-        __u32                   qc_cmd;
-        __u32                   qc_type;
-        __u32                   qc_id;
-        __u32                   qc_stat;
-        struct obd_dqinfo       qc_dqinfo;
-        struct obd_dqblk        qc_dqblk;
-        char                    obd_type[16];
-        struct obd_uuid         obd_uuid;
+       __u32                   qc_cmd;
+       __u32                   qc_type;
+       __u32                   qc_id;
+       __u32                   qc_stat;
+       struct obd_dqinfo       qc_dqinfo;
+       struct obd_dqblk        qc_dqblk;
+       char                    obd_type[16];
+       struct obd_uuid         obd_uuid;
 };
 #define LL_IOC_QUOTACTL_18              _IOWR('f', 162, struct if_quotactl_18 *)
 /* End compatibility for old (1.8) compiled userspace quota code */
-#else
-#warning "remove old LL_IOC_QUOTACTL_18 compatibility code"
-#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0) */
+#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0) */
 
 enum {
        LL_LAYOUT_GEN_NONE  = ((__u32)-2),      /* layout lock was cancelled */
index 7407f42..6727dc8 100644 (file)
@@ -844,7 +844,7 @@ static int ll_options(char *options, int *flags)
                         *flags &= ~tmp;
                         goto next;
                 }
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 52, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                tmp = ll_set_opt("acl", s1, LL_SBI_ACL);
                if (tmp) {
                        /* Ignore deprecated mount option.  The client will
@@ -860,14 +860,12 @@ static int ll_options(char *options, int *flags)
                                                  "mount option 'noacl'.\n");
                        goto next;
                }
-#else
-#warning "{no}acl options have been deprecated since 1.8, please remove them"
 #endif
-                tmp = ll_set_opt("remote_client", s1, LL_SBI_RMT_CLIENT);
-                if (tmp) {
-                        *flags |= tmp;
-                        goto next;
-                }
+               tmp = ll_set_opt("remote_client", s1, LL_SBI_RMT_CLIENT);
+               if (tmp) {
+                       *flags |= tmp;
+                       goto next;
+               }
                tmp = ll_set_opt("user_fid2path", s1, LL_SBI_USER_FID2PATH);
                if (tmp) {
                        *flags |= tmp;
index dbc381e..09f9952 100644 (file)
@@ -1622,27 +1622,25 @@ again:
                 GOTO(out, rc = ealen);
 
        if (ealen > nrpages << PAGE_CACHE_SHIFT)
-                GOTO(out, rc = -EINVAL);
+               GOTO(out, rc = -EINVAL);
 
-        if (ealen == 0) { /* no logs transferred */
-                if (!eof)
-                        rc = -EINVAL;
-                GOTO(out, rc);
-        }
+       if (ealen == 0) { /* no logs transferred */
+               if (!eof)
+                       rc = -EINVAL;
+               GOTO(out, rc);
+       }
 
        mne_swab = !!ptlrpc_rep_need_swab(req);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0)
        /* This import flag means the server did an extra swab of IR MNE
         * records (fixed in LU-1252), reverse it here if needed. LU-1644 */
        if (unlikely(req->rq_import->imp_need_mne_swab))
                mne_swab = !mne_swab;
-#else
-#warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and imp_need_mne_swab"
 #endif
 
-        for (i = 0; i < nrpages && ealen > 0; i++) {
-                int rc2;
-                void *ptr;
+       for (i = 0; i < nrpages && ealen > 0; i++) {
+               int rc2;
+               void *ptr;
 
                ptr = kmap(pages[i]);
                rc2 = mgc_apply_recover_logs(obd, cld, res->mcr_offset, ptr,
index 54ce929..bc006c9 100644 (file)
@@ -134,23 +134,23 @@ static int mgs_nidtbl_read(struct obd_export *exp, struct mgs_nidtbl *tbl,
                                 break;
                         }
 
-                        /* check if we need to consume remaining bytes. */
-                        if (last_in_unit != NULL && bytes_in_unit) {
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 50, 0)
+                       /* check if we need to consume remaining bytes. */
+                       if (last_in_unit != NULL && bytes_in_unit) {
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                                /* May need to swab back to update the length.*/
                                if (exp->exp_need_mne_swab)
                                        lustre_swab_mgs_nidtbl_entry(last_in_unit);
 #endif
                                last_in_unit->mne_length += bytes_in_unit;
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                                if (exp->exp_need_mne_swab)
                                        lustre_swab_mgs_nidtbl_entry(last_in_unit);
 #endif
-                                rc  += bytes_in_unit;
-                                buf += bytes_in_unit;
-                                last_in_unit = NULL;
-                        }
-                        LASSERT((rc & (unit_size - 1)) == 0);
+                               rc  += bytes_in_unit;
+                               buf += bytes_in_unit;
+                               last_in_unit = NULL;
+                       }
+                       LASSERT((rc & (unit_size - 1)) == 0);
 
                        if (units_in_page == 0) {
                                /* allocate a new page */
@@ -192,7 +192,7 @@ static int mgs_nidtbl_read(struct obd_export *exp, struct mgs_nidtbl *tbl,
                 memcpy(entry->u.nids, mti->mti_nids,
                        mti->mti_nid_count * sizeof(lnet_nid_t));
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                /* For LU-1644, swab entry for 2.2 clients. */
                if (exp->exp_need_mne_swab)
                        lustre_swab_mgs_nidtbl_entry(entry);
index 24f6c22..dd1f1ea 100644 (file)
@@ -455,10 +455,8 @@ int lustre_start_mgc(struct super_block *sb)
                                  OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV |
                                  OBD_CONNECT_LVB_TYPE;
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0)
        data->ocd_connect_flags |= OBD_CONNECT_MNE_SWAB;
-#else
-#warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and imp_need_mne_swab"
 #endif
 
         if (lmd_is_client(lsi->lsi_lmd) &&
index 4db3f1a..9ce41e4 100644 (file)
@@ -775,7 +775,7 @@ int ofd_attr_get(const struct lu_env *env, struct ofd_object *fo,
                rc = dt_attr_get(env, ofd_object_child(fo), la,
                                 ofd_object_capa(env, fo));
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
                /* Try to correct for a bug in 2.1.0 (LU-221) that caused
                 * negative timestamps to appear to be in the far future,
                 * due old timestamp being stored on disk as an unsigned value.
@@ -788,8 +788,6 @@ int ofd_attr_get(const struct lu_env *env, struct ofd_object *fo,
                        la->la_mtime = 0;
                if (unlikely(la->la_ctime == LU221_BAD_TIME))
                        la->la_ctime = 0;
-#else
-#warning "remove old LU-221/LU-1042 workaround code"
 #endif
        } else {
                rc = -ENOENT;
index a56f890..8513bfa 100644 (file)
@@ -607,11 +607,10 @@ int osd_declare_inode_qid(const struct lu_env *env, qid_t uid, qid_t gid,
        RETURN(rcu ? rcu : rcg);
 }
 
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
 /* Following code is used to migrate old admin quota files (in Linux quota
  * file v2 format) into the new quota global indexes (in IAM format). */
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2,7,50,0)
-
 /* copied from osd_it_acct_get(), only changed the 'type' to -1 */
 static int osd_it_admin_get(const struct lu_env *env, struct dt_it *di,
                            const struct dt_key *key)
@@ -1117,6 +1116,4 @@ out:
 
        RETURN(rc);
 }
-#else
-#warning "remove old quota compatibility code"
-#endif
+#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0) */
index e37e910..161c3a1 100644 (file)
@@ -65,7 +65,7 @@ static ssize_t quota_read_blk(const struct lu_env *env,
 
        memset(buf, 0, LUSTRE_DQBLKSIZE);
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2,7,50,0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
        /* type is set as -1 when reading old admin quota file */
        if (type != USRQUOTA && type != GRPQUOTA) {
                struct lu_buf   lu_buffer;
index 43779a9..b635943 100644 (file)
@@ -670,11 +670,6 @@ static int osd_dir_delete(const struct lu_env *env, struct dt_object *dt,
        rc = -zap_remove(osd->od_objset.os, zap_db->db_object,
                         (char *) key, oh->ot_tx);
 
-#if LUSTRE_VERSION_CODE <= OBD_OCD_VERSION(2, 4, 53, 0)
-       if (unlikely(rc == -ENOENT && name[0] == '.' &&
-           (name[1] == 0 || (name[1] == '.' && name[2] == 0))))
-               rc = 0;
-#endif
        if (unlikely(rc && rc != -ENOENT))
                CERROR("%s: zap_remove failed: rc = %d\n", osd->od_svname, rc);
 
@@ -851,19 +846,6 @@ static struct dt_key *osd_dir_it_key(const struct lu_env *env,
 
        strcpy(it->ozi_name, za->za_name);
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 3, 90, 0)
-       if (za->za_name[0] == '.') {
-               if (za->za_name[1] == 0 || (za->za_name[1] == '.' &&
-                   za->za_name[2] == 0)) {
-                       /* we should not get onto . and ..
-                        * stored in the directory. ->next() and
-                        * other methods should prevent this
-                        */
-                       LBUG();
-               }
-       }
-#endif
-
        RETURN((struct dt_key *)it->ozi_name);
 }
 
@@ -884,18 +866,6 @@ static int osd_dir_it_key_size(const struct lu_env *env, const struct dt_it *di)
        if ((rc = -zap_cursor_retrieve(it->ozi_zc, za)) == 0)
                rc = strlen(za->za_name);
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 3, 90, 0)
-       if (rc == 0 && za->za_name[0] == '.') {
-               if (za->za_name[1] == 0 || (za->za_name[1] == '.' &&
-                   za->za_name[2] == 0)) {
-                       /* we should not get onto . and ..
-                        * stored in the directory. ->next() and
-                        * other methods should prevent this
-                        */
-                       LBUG();
-               }
-       }
-#endif
        RETURN(rc);
 }
 
index ae43f74..f7e200d 100644 (file)
@@ -1073,7 +1073,7 @@ finish:
                        warned = true;
                }
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0)
                /* Check if server has LU-1252 fix applied to not always swab
                 * the IR MNE entries. Do this only once per connection.  This
                 * fixup is version-limited, because we don't want to carry the
@@ -1090,8 +1090,6 @@ finish:
                        imp->imp_need_mne_swab = 1;
                else /* clear if server was upgraded since last connect */
                        imp->imp_need_mne_swab = 0;
-#else
-#warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and imp_need_mne_swab"
 #endif
 
                if (ocd->ocd_connect_flags & OBD_CONNECT_CKSUM) {
index 6bfc1d2..57a1e03 100644 (file)
@@ -1003,10 +1003,10 @@ struct req_msg_field RMF_CONN =
 EXPORT_SYMBOL(RMF_CONN);
 
 struct req_msg_field RMF_CONNECT_DATA =
-        DEFINE_MSGF("cdata",
-                    RMF_F_NO_SIZE_CHECK /* we allow extra space for interop */,
-#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 7, 50, 0)
-                    sizeof(struct obd_connect_data),
+       DEFINE_MSGF("cdata",
+                   RMF_F_NO_SIZE_CHECK /* we allow extra space for interop */,
+#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 7, 53, 0)
+                   sizeof(struct obd_connect_data),
 #else
 /* For interoperability with 1.8 and 2.0 clients/servers.
  * The RPC verification code allows larger RPC buffers, but not
@@ -1015,9 +1015,9 @@ struct req_msg_field RMF_CONNECT_DATA =
  * size is at least as large as obd_connect_data_v1.  That is not
  * not in itself harmful, since the chance of just corrupting this
  * field is low.  See JIRA LU-16 for details. */
-                    sizeof(struct obd_connect_data_v1),
+                   sizeof(struct obd_connect_data_v1),
 #endif
-                    lustre_swab_connect, NULL);
+                   lustre_swab_connect, NULL);
 EXPORT_SYMBOL(RMF_CONNECT_DATA);
 
 struct req_msg_field RMF_DLM_REQ =
index 82cebfd..a5d50d8 100644 (file)
@@ -1325,7 +1325,7 @@ __u32 lustre_msg_get_cksum(struct lustre_msg *msg)
         }
 }
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
 /*
  * In 1.6 and 1.8 the checksum was computed only on struct ptlrpc_body as
  * it was in 1.6 (88 bytes, smaller than the full size in 1.8).  It makes
@@ -1336,32 +1336,26 @@ __u32 lustre_msg_get_cksum(struct lustre_msg *msg)
 
 __u32 lustre_msg_calc_cksum(struct lustre_msg *msg, int compat18)
 #else
-# warning "remove checksum compatibility support for b1_8"
 __u32 lustre_msg_calc_cksum(struct lustre_msg *msg)
 #endif
 {
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
-               __u32 crc;
-               unsigned int hsize = 4;
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
                __u32 len = compat18 ? ptlrpc_body_cksum_size_compat18 :
                            lustre_msg_buflen(msg, MSG_PTLRPC_BODY_OFF);
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-               cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32, (unsigned char *)pb,
-                                      len, NULL, 0, (unsigned char *)&crc,
-                                      &hsize);
-               return crc;
 #else
-# warning "remove checksum compatibility support for b1_8"
-               __u32 crc;
+               __u32 len = lustre_msg_buflen(msg, MSG_PTLRPC_BODY_OFF);
+#endif
                unsigned int hsize = 4;
+               __u32 crc;
+
+               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
                cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32, (unsigned char *)pb,
-                                  lustre_msg_buflen(msg, MSG_PTLRPC_BODY_OFF),
-                                  NULL, 0, (unsigned char *)&crc, &hsize);
+                                      len, NULL, 0, (unsigned char *)&crc,
+                                      &hsize);
                return crc;
-#endif
        }
        default:
                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
index ee9a093..95329c5 100644 (file)
@@ -101,15 +101,14 @@ int null_ctx_verify(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)
 
         if (req->rq_early) {
                 cksums = lustre_msg_get_cksum(req->rq_repdata);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
-                if (lustre_msghdr_get_flags(req->rq_reqmsg) &
-                    MSGHDR_CKSUM_INCOMPAT18)
-                        cksumc = lustre_msg_calc_cksum(req->rq_repmsg, 0);
-                else
-                        cksumc = lustre_msg_calc_cksum(req->rq_repmsg, 1);
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
+               if (lustre_msghdr_get_flags(req->rq_reqmsg) &
+                   MSGHDR_CKSUM_INCOMPAT18)
+                       cksumc = lustre_msg_calc_cksum(req->rq_repmsg, 0);
+               else
+                       cksumc = lustre_msg_calc_cksum(req->rq_repmsg, 1);
 #else
-# warning "remove checksum compatibility support for b1_8"
-                cksumc = lustre_msg_calc_cksum(req->rq_repmsg);
+               cksumc = lustre_msg_calc_cksum(req->rq_repmsg);
 #endif
                 if (cksumc != cksums) {
                         CDEBUG(D_SEC,
@@ -371,21 +370,20 @@ int null_authorize(struct ptlrpc_request *req)
         } else {
                 __u32 cksum;
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0)
-                if (lustre_msghdr_get_flags(req->rq_reqmsg) &
-                    MSGHDR_CKSUM_INCOMPAT18)
-                        cksum = lustre_msg_calc_cksum(rs->rs_repbuf, 0);
-                else
-                        cksum = lustre_msg_calc_cksum(rs->rs_repbuf, 1);
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
+               if (lustre_msghdr_get_flags(req->rq_reqmsg) &
+                   MSGHDR_CKSUM_INCOMPAT18)
+                       cksum = lustre_msg_calc_cksum(rs->rs_repbuf, 0);
+               else
+                       cksum = lustre_msg_calc_cksum(rs->rs_repbuf, 1);
 #else
-# warning "remove checksum compatibility support for b1_8"
-                cksum = lustre_msg_calc_cksum(rs->rs_repbuf);
+               cksum = lustre_msg_calc_cksum(rs->rs_repbuf);
 #endif
-                lustre_msg_set_cksum(rs->rs_repbuf, cksum);
-                req->rq_reply_off = 0;
-        }
+               lustre_msg_set_cksum(rs->rs_repbuf, cksum);
+               req->rq_reply_off = 0;
+       }
 
-        return 0;
+       return 0;
 }
 
 static struct ptlrpc_ctx_ops null_ctx_ops = {
index 2280f06..3d267ef 100644 (file)
@@ -244,14 +244,13 @@ struct dt_object *lquota_disk_glb_find_create(const struct lu_env *env,
        CDEBUG(D_QUOTA, "look-up/create %sglobal idx file ("DFID")\n",
               local ? "local " : "", PFID(fid));
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2,7,50,0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
        /* we use different index feature for each quota type and target type
         * for the time being. This is done for on-disk conversion from the old
         * quota format. Once this is no longer required, we should just be
         * using dt_quota_glb_features for all global index file */
        idx_feat = glb_idx_feature(fid);
 #else
-#warning "remove old quota compatibility code"
        idx_feat = &dt_quota_glb_features;
 #endif
 
index 7c0fb54..427a3a2 100644 (file)
@@ -289,7 +289,7 @@ int lquota_extract_fid(const struct lu_fid *fid, int *pool_id, int *pool_type,
        RETURN(0);
 }
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2,7,50,0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
 /* Index features supported by the global index objects.
  * We actually use one dt_index_features structure for each quota combination
  * of quota type x [inode, block] to allow the ldiskfs OSD to recognize those
@@ -328,9 +328,7 @@ const struct dt_index_features *glb_idx_feature(struct lu_fid *fid)
                        return &dt_quota_bgrp_features;
        }
 }
-#else
-#warning "remove old quota compatibility code"
-#endif
+#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0) */
 
 static int __init init_lquota(void)
 {
@@ -340,11 +338,9 @@ static int __init init_lquota(void)
        lquota_key_init_generic(&lquota_thread_key, NULL);
        lu_context_key_register(&lquota_thread_key);
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2,7,50,0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
        dt_quota_iusr_features = dt_quota_busr_features = dt_quota_glb_features;
        dt_quota_igrp_features = dt_quota_bgrp_features = dt_quota_glb_features;
-#else
-#warning "remove old quota compatibility code"
 #endif
 
        rc = lu_kmem_init(lquota_caches);
index e937894..29b3ae1 100644 (file)
@@ -759,24 +759,21 @@ static void clean_path(char *path)
  * Path support is deprecated.
  * If a path is supplied it must begin with /proc.  */
 static void lprocfs_param_pattern(const char *cmd, const char *path, char *buf,
-        size_t buf_size)
+                                 size_t buf_size)
 {
-        /* test path to see if it begins with '/proc/' */
-        if (strncmp(path, "/proc/", strlen("/proc/")) == 0) {
-                static int warned;
-                if (!warned) {
-                        fprintf(stderr, "%s: specifying parameters via "
-                                "full paths is deprecated.\n", cmd);
 #if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 6, 53, 0)
-#warning "remove deprecated full path tunable access"
+       /* test path to see if it begins with '/proc/' */
+       if (strncmp(path, "/proc/", strlen("/proc/")) == 0) {
+               static int warned;
+               if (!warned) {
+                       fprintf(stderr, "%s: specifying parameters via "
+                               "full paths is deprecated.\n", cmd);
+                       warned = 1;
+               }
+               snprintf(buf, buf_size, "%s", path);
+       } else
 #endif
-                        warned = 1;
-                }
-                snprintf(buf, buf_size, "%s", path);
-        } else {
-                snprintf(buf, buf_size, "/proc/{fs,sys}/{lnet,lustre}/%s",
-                        path);
-        }
+       snprintf(buf, buf_size, "/proc/{fs,sys}/{lnet,lustre}/%s", path);
 }
 
 static int listparam_cmdline(int argc, char **argv, struct param_opts *popt)
index 13b56c7..64da5e5 100644 (file)
@@ -54,7 +54,7 @@
 #include <ctype.h>
 #include <limits.h>
 #include <lustre/lustre_idl.h>
-#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 10, 51, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 10, 53, 0)
 /*
  * LU-1783
  * We only #include a kernel level include file here because
  * 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
  */
-#warn remove kernel include
-#elif !defined(MS_RDONLY)
+#if !defined(MS_RDONLY)
 #include <linux/fs.h>
 #endif
+#endif
 
 #define MAXOPT 4096
 #define MAX_RETRIES 99
@@ -258,35 +258,36 @@ int parse_options(struct mount_opts *mop, char *orig_options, int *flagp)
                } else if (strncmp(arg, "nosvc", 5) == 0) {
                        mop->mo_nosvc = 1;
                        append_option(options, opt);
-                } else if (strcmp(opt, "force") == 0) {
-                        //XXX special check for 'force' option
+               } else if (strcmp(opt, "force") == 0) {
+                       /* XXX special check for 'force' option */
                        ++mop->mo_force;
                        printf("force: %d\n", mop->mo_force);
-                } else if (parse_one_option(opt, flagp) == 0) {
-                        /* pass this on as an option */
-                        append_option(options, opt);
-                }
-        }
+               } else if (parse_one_option(opt, flagp) == 0) {
+                       /* pass this on as an option */
+                       append_option(options, opt);
+               }
+       }
 #ifdef MS_STRICTATIME
-#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 10, 51, 0)
-/*
- * LU-1783
- * In the future when upstream fixes land in all supported kernels
- * we should stop forcing MS_STRICTATIME in lustre mounts.
- * We override the kernel level default of MS_RELATIME for now
- * due to a kernel vfs level bug in atime updates that fails
- * to reset timestamps from the future.
- */
-#warn remove MS_STRICTATIME override
+#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(3, 2, 53, 0)
+       /*
       * LU-1783
       * In the future when upstream fixes land in all supported kernels
       * we should stop forcing MS_STRICTATIME in lustre mounts.
       * We override the kernel level default of MS_RELATIME for now
       * due to a kernel vfs level bug in atime updates that fails
       * to reset timestamps from the future.
       */
+#warn "remove MS_STRICTATIME override if kernel updates atime from the future"
 #endif
        /* set strictatime to default if NOATIME or RELATIME
           not given explicit */
        if (!(*flagp & (MS_NOATIME | MS_RELATIME)))
                *flagp |= MS_STRICTATIME;
 #endif
-        strcpy(orig_options, options);
-        free(options);
-        return 0;
+       strcpy(orig_options, options);
+       free(options);
+
+       return 0;
 }
 
 /* Add mgsnids from ldd params */