summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2014-05-30 08:47:32 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-06-10 06:01:03 -0700
commitb12b15a186714ec4d5639b778f15e075c833ce55 (patch)
tree4786131ff3cd30241ae174201269a9d9a73e9b4c /xlators/mgmt/glusterd/src
parentb97e8f4ef649ed825b4f02b74e33946f6b551cec (diff)
glusterd/snapshot : Dont create quota.conf if quota is not enabled.
Problem : Quota.conf was getting created during handshake of glusterds even if quota was not enabled. Solution : Check if quota is enabled. If not, then dont create quota.conf. Change-Id: I55ae487aab5759b25a561705645c1c77ff108670 BUG: 1101483 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7934 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index ebea150604b..1f0e3ef49b5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -2943,15 +2943,20 @@ glusterd_add_snap_to_dict (glusterd_snap_t *snap, dict_t *peer_data,
goto out;
}
- ret = glusterd_vol_add_quota_conf_to_dict (volinfo, peer_data,
- volcount, prefix);
- if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "Failed to add quota conf for "
- "snap:%s volume:%s to peer_data "
- "dict for handshake", snap->snapname,
- volinfo->volname);
- goto out;
+ if (glusterd_is_volume_quota_enabled (volinfo)) {
+
+ ret = glusterd_vol_add_quota_conf_to_dict (volinfo,
+ peer_data,
+ volcount,
+ prefix);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Failed to add quota conf for "
+ "snap:%s volume:%s to peer_data "
+ "dict for handshake", snap->snapname,
+ volinfo->volname);
+ goto out;
+ }
}
list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {