summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-07-27 04:29:26 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-27 11:33:28 -0700
commitffa5118b2eec9cd12e43ca10d86e91d02a9090a8 (patch)
tree8b5f366a273c875474a0e564956bec863857c56f /xlators/cluster
parentdf868214c077065cfeafcfdadb6bbf5151d20b3d (diff)
cluster/afr: Set inode number in unwind_buf in the inode-write calls.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 166 (libglusterfsclient: Cached stat buf inode is different from ino in inode_t) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=166
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 1c1a9b034..6a2774bee 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -72,14 +72,14 @@ afr_chmod_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.chmod.buf.st_ino = local->cont.chmod.ino;
-
if (local->cont.chmod.read_child_buf.st_ino) {
unwind_buf = &local->cont.chmod.read_child_buf;
} else {
unwind_buf = &local->cont.chmod.buf;
}
+ unwind_buf->st_ino = local->cont.chmod.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno,
unwind_buf);
}
@@ -287,14 +287,14 @@ afr_fchmod_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.fchmod.buf.st_ino = local->cont.fchmod.ino;
-
if (local->cont.fchmod.read_child_buf.st_ino) {
unwind_buf = &local->cont.fchmod.read_child_buf;
} else {
unwind_buf = &local->cont.fchmod.buf;
}
-
+
+ unwind_buf->st_ino = local->cont.fchmod.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno,
unwind_buf);
}
@@ -502,14 +502,14 @@ afr_chown_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.chown.buf.st_ino = local->cont.chown.ino;
-
if (local->cont.chown.read_child_buf.st_ino) {
unwind_buf = &local->cont.chown.read_child_buf;
} else {
unwind_buf = &local->cont.chown.buf;
}
+ unwind_buf->st_ino = local->cont.chown.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno,
unwind_buf);
}
@@ -721,14 +721,14 @@ afr_fchown_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.fchown.buf.st_ino = local->cont.fchown.ino;
-
if (local->cont.fchown.read_child_buf.st_ino) {
unwind_buf = &local->cont.fchown.read_child_buf;
} else {
unwind_buf = &local->cont.fchown.buf;
}
+ unwind_buf->st_ino = local->cont.fchown.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno,
unwind_buf);
}
@@ -939,14 +939,14 @@ afr_writev_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.writev.buf.st_ino = local->cont.writev.ino;
-
if (local->cont.writev.read_child_buf.st_ino) {
unwind_buf = &local->cont.writev.read_child_buf;
} else {
unwind_buf = &local->cont.writev.buf;
}
+ unwind_buf->st_ino = local->cont.writev.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno,
unwind_buf);
}
@@ -1172,14 +1172,14 @@ afr_truncate_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.truncate.buf.st_ino = local->cont.truncate.ino;
-
if (local->cont.truncate.read_child_buf.st_ino) {
unwind_buf = &local->cont.truncate.read_child_buf;
} else {
unwind_buf = &local->cont.truncate.buf;
}
+ unwind_buf->st_ino = local->cont.truncate.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret,
local->op_errno,
unwind_buf);
@@ -1394,14 +1394,14 @@ afr_ftruncate_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.ftruncate.buf.st_ino = local->cont.ftruncate.ino;
-
if (local->cont.ftruncate.read_child_buf.st_ino) {
unwind_buf = &local->cont.ftruncate.read_child_buf;
} else {
unwind_buf = &local->cont.ftruncate.buf;
}
+ unwind_buf->st_ino = local->cont.ftruncate.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno,
unwind_buf);
}
@@ -1613,14 +1613,14 @@ afr_utimens_unwind (call_frame_t *frame, xlator_t *this)
UNLOCK (&frame->lock);
if (main_frame) {
- local->cont.utimens.buf.st_ino = local->cont.utimens.ino;
-
if (local->cont.utimens.read_child_buf.st_ino) {
unwind_buf = &local->cont.utimens.read_child_buf;
} else {
unwind_buf = &local->cont.utimens.buf;
}
+ unwind_buf->st_ino = local->cont.utimens.ino;
+
AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno,
unwind_buf);
}