diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-10-29 05:38:13 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-29 04:17:08 -0700 |
commit | c65be2d304c67e57447d6d4a2e53fae07e31ff5c (patch) | |
tree | 29261d0e1fcd46136889a4a9542789b8a6fd4d03 /xlators/nfs/server/src/nfs.c | |
parent | 413b2a5f9b77fd3d7f3b26c848482ec7b914102f (diff) |
nfs: Introduce nfs.enable-ino32 to support legacy 32-bit only appsv3.1.1qa2
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1972 (xcs get doesn't work with gNFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1972
Diffstat (limited to 'xlators/nfs/server/src/nfs.c')
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 0afd85f51de..c81e48322ab 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -520,6 +520,25 @@ nfs_init_state (xlator_t *this) nfs->dynamicvolumes = GF_NFS_DVM_ON; } + nfs->enable_ino32 = 0; + if (dict_get (this->options, "nfs.enable-ino32")) { + ret = dict_get_str (this->options, "nfs.enable-ino32", + &optstr); + if (ret < 0) { + gf_log (GF_NFS, GF_LOG_ERROR, "Failed to parse dict"); + goto free_foppool; + } + + ret = gf_string2boolean (optstr, &boolt); + if (ret < 0) { + gf_log (GF_NFS, GF_LOG_ERROR, "Failed to parse bool " + "string"); + goto free_foppool; + } + + if (boolt == _gf_true) + nfs->enable_ino32 = 1; + } this->private = (void *)nfs; INIT_LIST_HEAD (&nfs->versions); @@ -802,6 +821,13 @@ struct volume_options options[] = { "If all subvolumes do not have this option set, an " "error is reported." }, + { .key = {"nfs.enable-ino32"}, + .type = GF_OPTION_TYPE_BOOL, + .description = "For nfs clients or apps that do not support 64-bit " + "inode numbers, use this option to make NFS return " + "32-bit inode numbers instead. Disabled by default so " + "NFS returns 64-bit inode numbers by default." + }, { .key = {NULL} }, }; |