diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2014-08-13 11:11:17 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2014-08-22 02:31:57 -0700 |
commit | 3b70b160a46b22b77a8ad1897440ec1346795a0f (patch) | |
tree | 5aa5047d58491c5fd6f97e5eab9e59df359608a9 /xlators/cluster/afr/src/pump.c | |
parent | 60f12dfbc87818831a65ac80ad8ba2fe166a29e2 (diff) |
cluster/afr: Perform gfid heal inside locks.
Problem:
Allowing lookup with 'gfid-req' will lead to assigning gfid at posix layer.
When two mounts perform lookup in parallel that can lead to both bricks getting
different gfids leading to gfid-mismatch/EIO for the lookup.
Fix:
Perform gfid heal inside lock.
BUG: 1129529
Change-Id: I20c6c5e25ee27eeb906bff2f4c8ad0da18d00090
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8512
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/pump.c')
-rw-r--r-- | xlators/cluster/afr/src/pump.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index eed5099563b..c6923fa45ac 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -520,7 +520,8 @@ gf_pump_traverse_directory (loc_t *loc) continue; } - ret = afr_selfheal_name (this, loc->gfid, entry->d_name); + ret = afr_selfheal_name (this, loc->gfid, entry->d_name, + NULL); if (ret) { gf_log (this->name, GF_LOG_ERROR, "%s: name self-heal failed (%s/%s)", |