diff options
author | M. Mohan Kumar <mohan@in.ibm.com> | 2013-11-15 14:19:11 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-20 14:46:16 -0800 |
commit | 2bb025699a8b9b34491c8b13a2bbb6da302a5d77 (patch) | |
tree | bcfca804f97dbbd960c0b74b499926b717e51e07 /xlators/mgmt/glusterd/src | |
parent | 5e31894fbda74a524e1fe30d26f7ed82a77eb5ff (diff) |
bd: Add Zerofill FOP support
BUG: 1028673
Change-Id: I9ba8e3e6cf2f888640b4d2a2eb934a27ff903c42
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/6290
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 16 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index ae03a40e567..740d04aa1e4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -464,6 +464,22 @@ glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo, } } + if (volinfo->caps & CAPS_OFFLOAD_ZERO) { + snprintf (key, 256, "volume%d.xlator0.caps%d", count, + caps++); + buf = GF_MALLOC (256, gf_common_mt_char); + if (!buf) { + ret = ENOMEM; + goto out; + } + snprintf (buf, 256, "offload_zerofill"); + ret = dict_set_dynstr (volumes, key, buf); + if (ret) { + GF_FREE (buf); + goto out; + } + } + } #endif diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index ad63682e55e..b081ec32eb4 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -238,6 +238,7 @@ typedef struct _auth auth_t; #define CAPS_THIN 0x00000002 #define CAPS_OFFLOAD_COPY 0x00000004 #define CAPS_OFFLOAD_SNAPSHOT 0x00000008 +#define CAPS_OFFLOAD_ZERO 0x00000020 struct glusterd_rebalance_ { gf_defrag_status_t defrag_status; |