summaryrefslogtreecommitdiffstats
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:46 -0700
commit5a41851e86177e82a8d4ae1457972d5011466eef (patch)
treea8303c99a9961d327492490d77c95c880d3a2a42
parent87071f027c47ac04b482527a2be58480b4fd5973 (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
-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);
}