diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-02-25 15:38:07 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-04 03:13:28 -0800 |
commit | a8f10e72f265e96f3785f278a3c4a3631b9f0392 (patch) | |
tree | 6dcd0a10831987279c3544e4cd4e13a4259a10f8 /xlators/cluster/dht/src/dht-rename.c | |
parent | 11433ebf94a58e0a40f115be8c6fe919c29ed61b (diff) |
distribute, nufa: return 0 mtimes in preparent/postparent
Returning 0 times means the values are unreliable and not to be
trusted for the purposes of caching.
This is a temporary fix till we bring in proper times handling in
DHT to return consistant values for parent inodes.
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597
Diffstat (limited to 'xlators/cluster/dht/src/dht-rename.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-rename.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c index 92e305613..11dab0193 100644 --- a/xlators/cluster/dht/src/dht-rename.c +++ b/xlators/cluster/dht/src/dht-rename.c @@ -82,6 +82,11 @@ dht_rename_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->preparent.st_ino = local->loc2.parent->ino; local->postparent.st_ino = local->loc2.parent->ino; + WIPE (&local->preoldparent); + WIPE (&local->postoldparent); + WIPE (&local->preparent); + WIPE (&local->postparent); + DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno, &local->stbuf, &local->preoldparent, &local->postoldparent, @@ -256,6 +261,11 @@ dht_rename_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, prev->this->name, strerror (op_errno)); } + WIPE (&local->preoldparent); + WIPE (&local->postoldparent); + WIPE (&local->preparent); + WIPE (&local->postparent); + if (is_last_call (this_call_cnt)) DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno, &local->stbuf, &local->preoldparent, @@ -368,6 +378,11 @@ dht_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, return 0; unwind: + WIPE (&local->preoldparent); + WIPE (&local->postoldparent); + WIPE (&local->preparent); + WIPE (&local->postparent); + DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno, &local->stbuf, &local->preoldparent, &local->postoldparent, &local->preparent, @@ -445,6 +460,11 @@ dht_rename_links_cbk (call_frame_t *frame, void *cookie, xlator_t *this, return 0; unwind: + WIPE (&local->preoldparent); + WIPE (&local->postoldparent); + WIPE (&local->preparent); + WIPE (&local->postparent); + DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno, &local->stbuf, &local->preoldparent, &local->postoldparent, &local->preparent, |