diff options
author | Niels de Vos <ndevos@redhat.com> | 2012-09-03 12:49:21 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-11-19 04:03:08 -0500 |
commit | 2e3b10e3d759583cc7df963ba09eb51f60445c49 (patch) | |
tree | 1df8a9af711dd8a381f13f4dbba72d8f55bfdea0 /glusterfsd | |
parent | ab4fed1445d35230b0ae6467a7d1fc7fdf1dbebc (diff) |
mount/fuse: add mount-option "enable-ino32" for the native client
From upstream commit c13823bd16b26bc471d3efb15f63b76fbfdf0309:
> By default the GlusterFS-native client uses 64-bit inodes. Some 32-bit
> applications can not handle these correctly. Introduce a client-side
> mount option "enable-ino32" which causes the FUSE-client to squash the
> 64-bit inodes into a 32-bit value.
>
> Change-Id: I3296d16528bfb50457b9675f6b8701234ed82ff0
> BUG: 850352
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/3885
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Anand Avati <avati@redhat.com>
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
BUG: 876679
Change-Id: Ie52ebc7d08f69a11cfa892a057bc9faf71446dcc
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/1585
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 18 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd.h | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index ebd12bf0b99..90f12e9f77b 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -154,6 +154,9 @@ static struct argp_option gf_options[] = { "Mount the filesystem with POSIX ACL support"}, {"selinux", ARGP_SELINUX_KEY, 0, 0, "Enable SELinux label (extened attributes) support on inodes"}, + {"enable-ino32", ARGP_INODE32_KEY, "BOOL", OPTION_ARG_OPTIONAL, + "Use 32-bit inodes when mounting to workaround broken applications" + "that don't support 64-bit inodes"}, {"worm", ARGP_WORM_KEY, 0, 0, "Mount the filesystem in 'worm' mode"}, {"mac-compat", ARGP_MAC_COMPAT_KEY, "BOOL", OPTION_ARG_OPTIONAL, @@ -359,6 +362,17 @@ create_fuse_mount (glusterfs_ctx_t *ctx) } } + if (cmd_args->enable_ino32) { + ret = dict_set_static_ptr (master->options, "enable-ino32", + "on"); + if (ret < 0) { + gf_log ("glusterfsd", GF_LOG_ERROR, + "failed to set dict value for key %s", + "enable-ino32"); + goto err; + } + } + if (cmd_args->read_only) { ret = dict_set_static_ptr (master->options, "read-only", "on"); if (ret < 0) { @@ -579,6 +593,10 @@ parse_opts (int key, char *arg, struct argp_state *state) cmd_args->selinux = 1; break; + case ARGP_INODE32_KEY: + cmd_args->enable_ino32 = 1; + break; + case ARGP_WORM_KEY: cmd_args->worm = 1; break; diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h index 8ec121954bb..e832b87a21a 100644 --- a/glusterfsd/src/glusterfsd.h +++ b/glusterfsd/src/glusterfsd.h @@ -87,6 +87,8 @@ enum argp_option_keys { ARGP_USER_MAP_ROOT_KEY = 156, ARGP_MEM_ACCOUNTING_KEY = 157, ARGP_SELINUX_KEY = 158, + /* glusterfs upstream includes options 159-162, but we dont */ + ARGP_INODE32_KEY = 159, /* 163 upstream */ }; struct _gfd_vol_top_priv_t { |