summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-10-26 06:51:18 +0530
committerXavier Hernandez <xhernandez@datalab.es>2016-10-26 23:23:20 -0700
commit24adb0607683cfec784933f332252a4cd53b8cb7 (patch)
tree879c18eb70a92a27d7a2a443a88a2ecc69d9c026 /xlators
parent3dde08333aeaa5491a42988e8115ab7b02c65184 (diff)
afr,ec: Heal device files with correct major, minor numbers
Thanks a lot to xiaoping.wu@nokia.com from Nokia for the bug and the fix. >BUG: 1384297 >Change-Id: Ie443237e85d34633b5dd30f85eaa2ac34e45754c >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/15728 >Smoke: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Change-Id: I28636a741592335cebcaa1abc2af8460ebc740e1 BUG: 1388949 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15736 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c3
-rw-r--r--xlators/cluster/ec/src/ec-heal.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 30db66b..5e8a568 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -148,7 +148,8 @@ afr_selfheal_recreate_entry (xlator_t *this, int dst, int source, inode_t *dir,
if (ret)
goto out;
ret = syncop_mknod (priv->children[dst], &loc, mode,
- iatt->ia_rdev, &newent, xdata, NULL);
+ makedev (ia_major(iatt->ia_rdev), ia_minor (iatt->ia_rdev)),
+ &newent, xdata, NULL);
if (ret == 0 && newent.ia_nlink == 1) {
/* New entry created. Mark @dst pending on all sources */
newentry[dst] = 1;
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index 94ff475..051d218 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -1148,7 +1148,8 @@ ec_create_name (call_frame_t *frame, ec_t *ec, inode_t *parent, char *name,
replies, output, frame, ec->xl,
&loc, st_mode_from_ia (ia->ia_prot,
ia->ia_type),
- ia->ia_rdev, 0, xdata);
+ makedev(ia_major(ia->ia_rdev), ia_minor(ia->ia_rdev)),
+ 0, xdata);
break;
}