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,
__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);
/* 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
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.
*
* 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);
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. */
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;
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 */
*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
"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;
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,
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 */
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);
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) &&
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.
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;
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)
RETURN(rc);
}
-#else
-#warning "remove old quota compatibility code"
-#endif
+#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0) */
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;
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);
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);
}
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);
}
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
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) {
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
* 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 =
}
}
-#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
__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);
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,
} 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 = {
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
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
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)
{
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);
* 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)
#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
} 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 */