summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-selfheal.c
diff options
context:
space:
mode:
authorAnand V. Avati <avati@blackhole.gluster.com>2009-10-16 07:30:23 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-16 06:22:10 -0700
commitcb76cadb74a36e220a2b6a886c0c8068abdad0c7 (patch)
tree16136a771cda80b982018c2cf09249307c05d7ee /xlators/cluster/dht/src/dht-selfheal.c
parentfa4e9d639b95b557ae64dab38c4c3ff8a0ec0d7a (diff)
distribute,nufa: layout handling changes
changes to make revalidate not fail but instead perform fresh lookup and swap inode context (layout) safely Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
Diffstat (limited to 'xlators/cluster/dht/src/dht-selfheal.c')
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index f3a92a1fe22..a254b0ddcb9 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -439,7 +439,7 @@ dht_selfheal_new_directory (call_frame_t *frame,
local = frame->local;
local->selfheal.dir_cbk = dir_cbk;
- local->selfheal.layout = layout;
+ local->selfheal.layout = dht_layout_ref (frame->this, layout);
dht_layout_sort_volname (layout);
dht_selfheal_layout_new_directory (frame, &local->loc, layout);
@@ -478,7 +478,7 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
misc = local->selfheal.misc;
local->selfheal.dir_cbk = dir_cbk;
- local->selfheal.layout = layout;
+ local->selfheal.layout = dht_layout_ref (this, layout);
if (down) {
gf_log (this->name, GF_LOG_DEBUG,
@@ -526,7 +526,7 @@ dht_selfheal_restore (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
local = frame->local;
local->selfheal.dir_cbk = dir_cbk;
- local->selfheal.layout = layout;
+ local->selfheal.layout = dht_layout_ref (frame->this, layout);
ret = dht_selfheal_dir_mkdir (frame, loc, layout, 1);