static inline int capa_for_mds(struct lustre_capa *c)
{
- return (c->lc_opc & CAPA_OPC_INDEX_INSERT) != 0;
+ return (c->lc_opc & CAPA_OPC_INDEX_LOOKUP) != 0;
}
static inline int capa_for_oss(struct lustre_capa *c)
{
- return (c->lc_opc & CAPA_OPC_INDEX_INSERT) == 0;
+ return (c->lc_opc & CAPA_OPC_INDEX_LOOKUP) == 0;
}
/* lustre_capa.lc_flags */
enum {
CAPA_CTX_ON = 1,
CAPA_CTX_TIMEOUT = 1<<1,
- CAPA_CTX_KEY_TIMEOUT = 1<<2,
- CAPA_CTX_ALG = 1<<3,
- CAPA_CTX_KEYS = 1<<4,
+ CAPA_CTX_ALG = 1<<2,
+ CAPA_CTX_KEYS = 1<<3,
};
#endif /* __LINUX_CAPA_H_ */
#define PARAM_SEC_RPC PARAM_SEC"rpc."
#define PARAM_SEC_RPC_MDT PARAM_SEC_RPC"mdt="
#define PARAM_SEC_RPC_CLI PARAM_SEC_RPC"cli="
-#define PARAM_ROOTSQUASH PARAM_SEC"rootsquash."
-#define PARAM_ROOTSQUASH_UID PARAM_ROOTSQUASH"uid="
-#define PARAM_ROOTSQUASH_GID PARAM_ROOTSQUASH"gid="
-#define PARAM_ROOTSQUASH_SKIPS PARAM_ROOTSQUASH"skips="
#endif // _LUSTRE_PARAM_H
capa_get(ocapa);
DEBUG_CAPA(D_SEC, &ocapa->c_capa, "found client");
- } else if (atomic_read(&ll_capa_debug)) {
- CERROR("no capability for "DFID" opc "LPX64"\n",
- PFID(&lli->lli_fid), opc);
- atomic_set(&ll_capa_debug, 0);
+ } else {
ocapa = NULL;
+
+ if (atomic_read(&ll_capa_debug)) {
+ CERROR("no capability for "DFID" opc "LPX64"\n",
+ PFID(&lli->lli_fid), opc);
+ atomic_set(&ll_capa_debug, 0);
+ }
}
spin_unlock(&capa_lock);
+
RETURN(ocapa);
}
int status)
{
struct obd_capa *oc = req->rq_async_args.pointer_arg[0];
- renew_capa_cb_t *cb = req->rq_async_args.pointer_arg[1];
+ renew_capa_cb_t cb = req->rq_async_args.pointer_arg[1];
struct mds_body *body = NULL;
struct lustre_capa *capa;
ENTRY;
EXIT;
out:
- (*cb)(oc, capa);
+ cb(oc, capa);
return 0;
}
static int mdt_renew_capa(struct mdt_thread_info *info)
{
+ struct mdt_device *mdt = info->mti_mdt;
struct mdt_object *obj = info->mti_object;
struct mdt_body *body;
struct lustre_capa *capa, *c;
c = req_capsule_client_get(&info->mti_pill, &RMF_CAPA1);
LASSERT(c);
+ if ((capa_for_mds(c) && !mdt->mdt_opts.mo_mds_capa) ||
+ (capa_for_oss(c) && !mdt->mdt_opts.mo_oss_capa)) {
+ DEBUG_CAPA(D_SEC, c,
+ "mds has disabled capability, skip renew for");
+ GOTO(out, rc = -ENOENT);
+ }
+
capa = req_capsule_server_get(&info->mti_pill, &RMF_CAPA1);
LASSERT(capa);
LASSERT(body);
body->valid |= OBD_MD_FLOSSCAPA;
+ EXIT;
+out:
body->flags = (__u32)rc;
-
- RETURN(0);
+ return 0;
}
static int mdt_getattr(struct mdt_thread_info *info)
#endif
+static int mdt_init_capa_ctxt(const struct lu_env *env, struct mdt_device *m)
+{
+ struct md_device *next = m->mdt_child;
+ __u32 valid = CAPA_CTX_TIMEOUT | CAPA_CTX_ALG | CAPA_CTX_KEYS;
+ int rc;
+
+ if (m->mdt_opts.mo_mds_capa)
+ valid |= CAPA_CTX_ON;
+ rc = next->md_ops->mdo_init_capa_ctxt(env, next, valid,
+ m->mdt_capa_timeout,
+ m->mdt_capa_alg,
+ m->mdt_capa_keys);
+ return rc;
+}
+
/*
* Invoke handler for this request opc. Also do necessary preprocessing
* (according to handler ->mh_flags), and post-processing (setting of
}
}
+ /* capability setting changed by /proc, needs reinitialize ctxt */
+ if (info->mti_mdt && info->mti_mdt->mdt_capa_conf) {
+ mdt_init_capa_ctxt(info->mti_env, info->mti_mdt);
+ info->mti_mdt->mdt_capa_conf = 0;
+ }
+
if (rc == 0) {
/*
* Process request, there can be two types of rc:
int mdt_postrecov(const struct lu_env *, struct mdt_device *);
-static int mdt_init_capa_ctxt(const struct lu_env *env, struct mdt_device *m)
-{
- struct md_device *next = m->mdt_child;
- __u32 valid = CAPA_CTX_TIMEOUT | CAPA_CTX_ALG | CAPA_CTX_KEYS;
- int rc;
-
- if (m->mdt_opts.mo_mds_capa)
- valid |= CAPA_CTX_ON;
- rc = next->md_ops->mdo_init_capa_ctxt(env, next, valid,
- m->mdt_capa_timeout,
- m->mdt_capa_alg,
- m->mdt_capa_keys);
- return rc;
-}
-
static int mdt_init0(const struct lu_env *env, struct mdt_device *m,
struct lu_device_type *ldt, struct lustre_cfg *cfg)
{
m->mdt_opts.mo_user_xattr = 0;
m->mdt_opts.mo_acl = 0;
m->mdt_opts.mo_compat_resname = 0;
- m->mdt_opts.mo_mds_capa = 0;
- m->mdt_opts.mo_oss_capa = 0;
m->mdt_capa_timeout = CAPA_TIMEOUT;
m->mdt_capa_alg = CAPA_HMAC_ALG_SHA1;
m->mdt_ck_timeout = CAPA_KEY_TIMEOUT;
return (rc);
}
-/* FIXME: this macro is copied from lnet/libcfs/nidstring.c */
-#define LNET_NIDSTR_SIZE 32 /* size of each one (see below for usage) */
-static void do_process_nosquash_nids(struct mdt_device *m, char *buf)
-{
- struct rootsquash_info *rsi = m->mdt_rootsquash_info;
- char str[LNET_NIDSTR_SIZE], *end;
- lnet_nid_t nid;
-
- LASSERT(rsi);
- rsi->rsi_n_nosquash_nids = 0;
- while (rsi->rsi_n_nosquash_nids < N_NOSQUASH_NIDS) {
- end = strchr(buf, ',');
- memset(str, 0, sizeof(str));
- if (end)
- strncpy(str, buf, min_t(int, sizeof(str), end - buf));
- else
- strncpy(str, buf, min_t(int, sizeof(str), strlen(buf)));
-
- if (!strcmp(str, "*")) {
- nid = LNET_NID_ANY;
- } else {
- nid = libcfs_str2nid(str);
- if (nid == LNET_NID_ANY)
- goto ignore;
- }
- rsi->rsi_nosquash_nids[rsi->rsi_n_nosquash_nids++] = nid;
-ignore:
- if (!end || (*(end + 1) == 0))
- return;
- buf = end + 1;
- }
-}
-
/* used by MGS to process specific configurations */
static int mdt_process_config(const struct lu_env *env,
struct lu_device *d, struct lustre_cfg *cfg)
{
struct mdt_device *m = mdt_dev(d);
- struct md_device *md_next = m->mdt_child;
+ struct md_device *md_next = m->mdt_child;
struct lu_device *next = md2lu_dev(md_next);
int rc = 0;
ENTRY;
switch (cfg->lcfg_command) {
case LCFG_PARAM: {
- int i;
-
- for (i = 1; i < cfg->lcfg_bufcount; i++) {
- char *key, *val;
-
- key = lustre_cfg_buf(cfg, i);
- val = strchr(key, '=');
- if (!val || (*(val + 1) == 0)) {
- CERROR("Can't parse param %s\n", key);
- rc = -EINVAL;
- /* continue parsing other params */
- continue;
- }
-
- val++;
- if (class_match_param(key,
- PARAM_ROOTSQUASH_UID, 0) == 0) {
- if (!m->mdt_rootsquash_info)
- OBD_ALLOC_PTR(m->mdt_rootsquash_info);
- if (!m->mdt_rootsquash_info)
- RETURN(-ENOMEM);
-
- m->mdt_rootsquash_info->rsi_uid =
- simple_strtoul(val, NULL, 0);
- } else if (class_match_param(key,
- PARAM_ROOTSQUASH_GID, 0) == 0) {
- if (!m->mdt_rootsquash_info)
- OBD_ALLOC_PTR(m->mdt_rootsquash_info);
- if (!m->mdt_rootsquash_info)
- RETURN(-ENOMEM);
-
- m->mdt_rootsquash_info->rsi_gid =
- simple_strtoul(val, NULL, 0);
- } else if (class_match_param(key,
- PARAM_ROOTSQUASH_SKIPS, 0) == 0) {
- if (!m->mdt_rootsquash_info)
- OBD_ALLOC_PTR(m->mdt_rootsquash_info);
- if (!m->mdt_rootsquash_info)
- RETURN(-ENOMEM);
-
- do_process_nosquash_nids(m, val);
- } else {
- rc = -EINVAL;
- }
- }
+ struct lprocfs_static_vars lvars;
+ struct obd_device *obd = d->ld_obd;
+ lprocfs_init_vars(mdt, &lvars);
+ rc = class_process_proc_param(PARAM_MDT, lvars.obd_vars, cfg, obd);
if (rc)
/* others are passed further */
rc = next->ld_ops->ldo_process_config(env, next, cfg);
struct timer_list mdt_ck_timer;
struct ptlrpc_thread mdt_ck_thread;
struct lustre_capa_key mdt_capa_keys[2];
+ unsigned int mdt_capa_conf:1;
};
/*XXX copied from mds_internal.h */
rsi ? rsi->rsi_uid : 0);
}
+static int lprocfs_wr_rootsquash_uid(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
+ int val, rc;
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc)
+ return rc;
+
+ if (!mdt->mdt_rootsquash_info)
+ OBD_ALLOC_PTR(mdt->mdt_rootsquash_info);
+ if (!mdt->mdt_rootsquash_info)
+ RETURN(-ENOMEM);
+
+ mdt->mdt_rootsquash_info->rsi_uid = val;
+ return count;
+}
+
static int lprocfs_rd_rootsquash_gid(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
rsi ? rsi->rsi_gid : 0);
}
+static int lprocfs_wr_rootsquash_gid(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
+ int val, rc;
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc)
+ return rc;
+
+ if (!mdt->mdt_rootsquash_info)
+ OBD_ALLOC_PTR(mdt->mdt_rootsquash_info);
+ if (!mdt->mdt_rootsquash_info)
+ RETURN(-ENOMEM);
+
+ mdt->mdt_rootsquash_info->rsi_gid = val;
+ return count;
+}
+
static int lprocfs_rd_rootsquash_skips(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
return ret;
}
+/* FIXME: this macro is copied from lnet/libcfs/nidstring.c */
+#define LNET_NIDSTR_SIZE 32 /* size of each one (see below for usage) */
+static void do_process_nosquash_nids(struct mdt_device *m, char *buf)
+{
+ struct rootsquash_info *rsi = m->mdt_rootsquash_info;
+ char str[LNET_NIDSTR_SIZE], *end;
+ lnet_nid_t nid;
+
+ LASSERT(rsi);
+ rsi->rsi_n_nosquash_nids = 0;
+ while (rsi->rsi_n_nosquash_nids < N_NOSQUASH_NIDS) {
+ end = strchr(buf, ',');
+ memset(str, 0, sizeof(str));
+ if (end)
+ strncpy(str, buf, min_t(int, sizeof(str), end - buf));
+ else
+ strncpy(str, buf, min_t(int, sizeof(str), strlen(buf)));
+
+ if (!strcmp(str, "*")) {
+ nid = LNET_NID_ANY;
+ } else {
+ nid = libcfs_str2nid(str);
+ if (nid == LNET_NID_ANY)
+ goto ignore;
+ }
+ rsi->rsi_nosquash_nids[rsi->rsi_n_nosquash_nids++] = nid;
+ignore:
+ if (!end || (*(end + 1) == 0))
+ return;
+ buf = end + 1;
+ }
+}
+
+static int lprocfs_wr_rootsquash_skips(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
+ char skips[LNET_NIDSTR_SIZE * N_NOSQUASH_NIDS] = "";
+ unsigned long size = sizeof(skips);
+
+ if (count > size) {
+ CERROR("parameter exceeds max limit %lu\n", size);
+ return -EINVAL;
+ }
+
+ if (copy_from_user(skips, buffer, min(size, count)))
+ return -EFAULT;
+
+ if (!mdt->mdt_rootsquash_info)
+ OBD_ALLOC_PTR(mdt->mdt_rootsquash_info);
+ if (!mdt->mdt_rootsquash_info)
+ RETURN(-ENOMEM);
+
+ do_process_nosquash_nids(mdt, skips);
+ return count;
+}
+
/* for debug only */
static int lprocfs_rd_capa(char *page, char **start, off_t off,
int count, int *eof, void *data)
static int lprocfs_wr_capa(struct file *file, const char *buffer,
unsigned long count, void *data)
{
- int val, rc;
-
- rc = lprocfs_write_helper(buffer, count, &val);
- if (rc)
- return rc;
-
- if (val & ~0x3) {
- CERROR("invalid value %u: only 0/1/2/3 is accepted.\n", val);
- CERROR("\t0: disable capability\n"
- "\t1: enable mds capability\n"
- "\t2: enable oss capability\n"
- "\t3: enable both mds and oss capability\n");
+ struct obd_device *obd = data;
+ struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
+ char mode[3] = "";
+
+ if (count > 3) {
+ CERROR("invalid capability mode, only m/o/mo/x is accepted.\n"
+ " m: enable MDS fid capability\n"
+ " o: enable OSS fid capability\n"
+ " mo: enable both MDS and OSS fid capability\n"
+ " x: disable fid capability\n");
return -EINVAL;
}
-// mds_capa_onoff(obd, val);
+ if (copy_from_user(mode, buffer, min(2UL, count)))
+ return -EFAULT;
+
+ mdt->mdt_opts.mo_mds_capa = 0;
+ mdt->mdt_opts.mo_oss_capa = 0;
+ if (strchr(mode, 'm'))
+ mdt->mdt_opts.mo_mds_capa = 1;
+ if (strchr(mode, 'o'))
+ mdt->mdt_opts.mo_oss_capa = 1;
+ mdt->mdt_capa_conf = 1;
return count;
}
}
static int lprocfs_rd_capa_timeout(char *page, char **start, off_t off,
- int count, int *eof, void *data)
+ int count, int *eof, void *data)
{
struct obd_device *obd = data;
struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
return snprintf(page, count, "%lu\n", mdt->mdt_capa_timeout);
}
+static int lprocfs_wr_capa_timeout(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
+ int val, rc;
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc)
+ return rc;
+
+ mdt->mdt_capa_timeout = (unsigned long)val;
+ mdt->mdt_capa_conf = 1;
+ return count;
+}
+
static int lprocfs_rd_ck_timeout(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
return snprintf(page, count, "%lu\n", mdt->mdt_ck_timeout);
}
+static int lprocfs_wr_ck_timeout(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
+ int val, rc;
+
+ rc = lprocfs_write_helper(buffer, count, &val);
+ if (rc)
+ return rc;
+
+ mdt->mdt_ck_timeout = (unsigned long)val;
+ mdt->mdt_capa_conf = 1;
+ return count;
+}
+
static struct lprocfs_vars lprocfs_mdt_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
{ "rmtacl_upcall", lprocfs_rd_rmtacl_upcall,
lprocfs_wr_rmtacl_upcall, 0 },
{ "rmtacl_info", 0, lprocfs_wr_rmtacl_info, 0 },
- { "rootsquash_uid", lprocfs_rd_rootsquash_uid, 0, 0 },
- { "rootsquash_gid", lprocfs_rd_rootsquash_gid, 0, 0 },
- { "rootsquash_skips", lprocfs_rd_rootsquash_skips, 0, 0 },
- { "capa", lprocfs_rd_capa, lprocfs_wr_capa, 0 },
- { "capa_timeout", lprocfs_rd_capa_timeout, 0, 0 },
- { "capa_key_timeout", lprocfs_rd_ck_timeout, 0, 0 },
+ { "rootsquash_uid", lprocfs_rd_rootsquash_uid,
+ lprocfs_wr_rootsquash_uid, 0 },
+ { "rootsquash_gid", lprocfs_rd_rootsquash_gid,
+ lprocfs_wr_rootsquash_gid, 0 },
+ { "rootsquash_skips", lprocfs_rd_rootsquash_skips,
+ lprocfs_wr_rootsquash_skips, 0 },
+ { "capa", lprocfs_rd_capa,
+ lprocfs_wr_capa, 0 },
+ { "capa_timeout", lprocfs_rd_capa_timeout,
+ lprocfs_wr_capa_timeout, 0 },
+ { "capa_key_timeout", lprocfs_rd_ck_timeout,
+ lprocfs_wr_ck_timeout, 0 },
{ "capa_count", lprocfs_rd_capa_count, 0, 0 },
{ 0 }
};
GOTO(end_while, rc);
}
- if (!class_match_param(ptr, PARAM_ROOTSQUASH, NULL)) {
- /* Change mds root_squash params */
- lustre_cfg_bufs_reset(&bufs, mti->mti_svname);
- lustre_cfg_bufs_set(&bufs, 1, ptr, strlen(ptr));
- lcfg = lustre_cfg_new(LCFG_PARAM, &bufs);
- rc = mgs_write_log_direct(obd, fsdb, mti->mti_svname,
- mti->mti_svname, lcfg);
- lustre_cfg_free(lcfg);
- GOTO(end_while, rc);
- }
-
LCONSOLE_WARN("Ignoring unrecognized param '%s'\n", ptr);
end_while:
if (rc)
goto invalid;
clear++;
+ } else if (strncmp(s1, "capa=", 5) == 0) {
+ lmd->lmd_nllu = simple_strtoul(s1 + 5, NULL, 10);
+ clear++;
}
/* Linux 2.4 doesn't pass the device, so we stuck it at the
end of the options. */
return count;
}
+static int lprocfs_filter_rd_capa(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ struct obd_device *obd = data;
+ int rc;
+
+ rc = snprintf(page, count, "capability on: %s\n",
+ obd->u.filter.fo_fl_oss_capa ? "oss" : "");
+ return rc;
+}
+
+static int lprocfs_filter_wr_capa(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ char mode[2] = "";
+
+ if (count > 2) {
+ CERROR("invalid capability mode, only o/x are accepted.\n"
+ " o: enable oss fid capability\n"
+ " x: disable oss fid capability\n");
+ return -EINVAL;
+ }
+
+ if (copy_from_user(mode, buffer, min(1UL, count)))
+ return -EFAULT;
+
+ if (strchr(mode, 'o'))
+ obd->u.filter.fo_fl_oss_capa = 1;
+ else
+ obd->u.filter.fo_fl_oss_capa = 0;
+
+ return count;
+}
+
+static int lprocfs_filter_rd_capa_count(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ return snprintf(page, count, "%d %d\n",
+ capa_count[CAPA_SITE_CLIENT],
+ capa_count[CAPA_SITE_SERVER]);
+}
+
static struct lprocfs_vars lprocfs_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "blocksize", lprocfs_rd_blksize, 0, 0 },
lprocfs_filter_wr_fmd_max_num, 0 },
{ "client_cache_seconds", lprocfs_filter_rd_fmd_max_age,
lprocfs_filter_wr_fmd_max_age, 0 },
+ { "capa", lprocfs_filter_rd_capa,
+ lprocfs_filter_wr_capa, 0 },
+ { "capa_count", lprocfs_filter_rd_capa_count, 0, 0 },
{ 0 }
};
MKFSOPT=$MKFSOPT" -i $MDSISIZE"
[ "x$MKFSOPT" != "x" ] &&
MKFSOPT="--mkfsoptions=\"$MKFSOPT\""
+[ "x$MDSCAPA" != "x" ] &&
+ MKFSOPT="--param mdt.capa=$MDSCAPA"
[ "x$mdsfailover_HOST" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
[ "x$STRIPE_BYTES" != "x" ] &&
MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
[ "x$MKFSOPT" != "x" ] &&
MKFSOPT="--mkfsoptions=\"$MKFSOPT\""
+[ "x$OSSCAPA" != "x" ] &&
+ MKFSOPT="--param ost.capa=$OSSCAPA"
[ "x$ostfailover_HOST" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $OSTOPT"
MKFSOPT=$MKFSOPT" -i $MDSISIZE"
[ "x$MKFSOPT" != "x" ] &&
MKFSOPT="--mkfsoptions=\"$MKFSOPT\""
+[ "x$MDSCAPA" != "x" ] &&
+ MKFSOPT="--param mdt.capa=$MDSCAPA"
[ "x$mdsfailover_HOST" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
[ "x$STRIPE_BYTES" != "x" ] &&
MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
[ "x$MKFSOPT" != "x" ] &&
MKFSOPT="--mkfsoptions=\"$MKFSOPT\""
+[ "x$OSSCAPA" != "x" ] &&
+ MKFSOPT="--param ost.capa=$OSSCAPA"
[ "x$ostfailover_HOST" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $OSTOPT"
MKFSOPT=$MKFSOPT" -i $MDSISIZE"
[ "x$MKFSOPT" != "x" ] &&
MKFSOPT="--mkfsoptions=\"$MKFSOPT\""
+[ "x$MDSCAPA" != "x" ] &&
+ MKFSOPT="--param mdt.capa=$MDSCAPA"
[ "x$mdsfailover_HOST" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
[ "x$STRIPE_BYTES" != "x" ] &&
MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
[ "x$MKFSOPT" != "x" ] &&
MKFSOPT="--mkfsoptions=\"$MKFSOPT\""
+[ "x$OSSCAPA" != "x" ] &&
+ MKFSOPT="--param ost.capa=$OSSCAPA"
[ "x$ostfailover_HOST" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $OSTOPT"