summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-heal.c
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2015-04-21 17:22:40 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-05-08 10:29:38 -0700
commit599726fec2e5c59b16a5aeb947342d65c1fc967f (patch)
tree8480c1b1a75b78ee137afa6cd335df1836ccd0dd /xlators/cluster/ec/src/ec-heal.c
parentd2a6bc99624528a04e4342a34cfe5a31dd706d56 (diff)
cluster/ec: add separate versions for data/entry, metadata
Adding 64 bits in "version" key of extended attributes. First 64 bits (Left) represents Data version. Last 64 bits (right) represents Meta Data version. Note: 3.7 and 3.6 version ec can't co-exist with this change because xattrop in 3.6 will fail with ERANGE as the buffer passed to it will be '8' bytes where as the value will be 16 bytes in 3.7. Where as 3.7 version clients can work with old version files. For upgrades we need to tell users to complete heals and then upgrade BUG: 1215265 Change-Id: Ib85114680cb7e75b8371c984d9f7b6401c1ffb93 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/10312 Reviewed-on: http://review.gluster.org/10626 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heal.c')
-rw-r--r--xlators/cluster/ec/src/ec-heal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index b8560005b94..6148df904a4 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -79,7 +79,8 @@ void ec_heal_lookup_resume(ec_fop_data_t * fop)
if (cbk->op_ret >= 0)
{
heal->iatt = cbk->iatt[0];
- heal->version = cbk->version;
+ heal->version[0] = cbk->version[0];
+ heal->version[1] = cbk->version[1];
heal->raw_size = cbk->size;
heal->fop->pre_size = cbk->iatt[0].ia_size;
heal->fop->post_size = cbk->iatt[0].ia_size;
@@ -856,7 +857,8 @@ void ec_heal_setxattr_others(ec_heal_t * heal)
if ((cbk->iatt[0].ia_type == IA_IFREG) ||
(cbk->iatt[0].ia_type == IA_IFDIR))
{
- if (ec_dict_set_number(xdata, EC_XATTR_VERSION, cbk->version) != 0)
+ if (ec_dict_set_array(xdata, EC_XATTR_VERSION,
+ cbk->version, EC_VERSION_SIZE) != 0)
{
goto out;
}