summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.c
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-04-30 16:50:47 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-06 10:48:46 -0700
commitb054985d2f7db9ab72759c988db11feb855a1b5e (patch)
tree65868f66cd616df79cc3b27c0a014a4c539febe1 /xlators/features/marker/src/marker.c
parente79edf35178f2558d6afb262444294380b76d740 (diff)
quota/marker: turn off inode quotas by default
inode quota is a new feature implemented in glusterfs-3.7 if quota is enabled in the older version and is upgraded to a new version, we can hit setxattr spike during self-heal of inode quotas. So, when a quota is enabled, turn off inode-quotas with a xlator option. With this patch, we still account for inode quotas but only when a write operation is performed for a particular file. User will be able to query inode quotas once the Inode-quota xlator option is enabled. Change-Id: I52fb28bf7024989ce7bb08ac63a303bf3ec1ec9a BUG: 1209430 Signed-off-by: vmallika <vmallika@redhat.com> Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/10152 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker.c')
-rw-r--r--xlators/features/marker/src/marker.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 046df1fc44c..a465723c1bb 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -3043,6 +3043,13 @@ reconfigure (xlator_t *this, dict_t *options)
}
}
+ data = dict_get (options, "inode-quota");
+ if (data) {
+ ret = gf_string2boolean (data->data, &flag);
+ if (ret == 0 && flag == _gf_true)
+ priv->feature_enabled |= GF_INODE_QUOTA;
+ }
+
data = dict_get (options, "xtime");
if (data) {
ret = gf_string2boolean (data->data, &flag);
@@ -3113,6 +3120,13 @@ init (xlator_t *this)
}
}
+ data = dict_get (options, "inode-quota");
+ if (data) {
+ ret = gf_string2boolean (data->data, &flag);
+ if (ret == 0 && flag == _gf_true)
+ priv->feature_enabled |= GF_INODE_QUOTA;
+ }
+
data = dict_get (options, "xtime");
if (data) {
ret = gf_string2boolean (data->data, &flag);
@@ -3206,6 +3220,7 @@ struct volume_options options[] = {
{.key = {"volume-uuid"}},
{.key = {"timestamp-file"}},
{.key = {"quota"}},
+ {.key = {"inode-quota"} },
{.key = {"xtime"}},
{.key = {"gsync-force-xtime"}},
{.key = {NULL}}