summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlex Elder <elder@dreamhost.com>2012-02-15 17:43:54 +0400
committerAlex Elder <elder@dreamhost.com>2012-03-22 19:47:51 +0400
commitcffaba15cd95d4a16eb5a6aa5c22a79f67d555ab (patch)
treed752174022e8444c70afb27e798e032163f89ac9 /net
parentd3002b974cefbb7c1e325cc296966f768ff76b06 (diff)
downloadlinux-cffaba15cd95d4a16eb5a6aa5c22a79f67d555ab.tar.xz
ceph: ensure Boolean options support both senses
Many ceph-related Boolean options offer the ability to both enable and disable a feature. For all those that don't offer this, add a new option so that they do. Note that ceph_show_options()--which reports mount options currently in effect--only reports the option if it is different from the default value. Signed-off-by: Alex Elder <elder@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/ceph_common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index 621c3221b393..cc913193d992 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -201,7 +201,9 @@ enum {
Opt_ip,
Opt_last_string,
/* string args above */
+ Opt_share,
Opt_noshare,
+ Opt_crc,
Opt_nocrc,
};
@@ -217,7 +219,9 @@ static match_table_t opt_tokens = {
{Opt_key, "key=%s"},
{Opt_ip, "ip=%s"},
/* string args above */
+ {Opt_share, "share"},
{Opt_noshare, "noshare"},
+ {Opt_crc, "crc"},
{Opt_nocrc, "nocrc"},
{-1, NULL}
};
@@ -399,10 +403,16 @@ ceph_parse_options(char *options, const char *dev_name,
opt->mount_timeout = intval;
break;
+ case Opt_share:
+ opt->flags &= ~CEPH_OPT_NOSHARE;
+ break;
case Opt_noshare:
opt->flags |= CEPH_OPT_NOSHARE;
break;
+ case Opt_crc:
+ opt->flags &= ~CEPH_OPT_NOCRC;
+ break;
case Opt_nocrc:
opt->flags |= CEPH_OPT_NOCRC;
break;