diff options
author | Amar Tumballi <amar@gluster.com> | 2011-10-24 12:12:47 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-11-08 22:10:05 -0800 |
commit | bff2fe53d51bcf9b3dbf97fc5a0d25ab3d452738 (patch) | |
tree | 8ca7b9658a40481f404133e77e1616365b076d0e /xlators/cluster/afr/src/afr-dir-write.c | |
parent | 51601b2bffea08f3b7fddf901e204b1bc649ab15 (diff) |
cluster/replicate: no more 'itransform' required for inode numbers
as posix layer itself sends inode numbers based on gfid now
Change-Id: I184d4598cf541eadb0471c39e598f14d6ac9390a
BUG: 3042
Reviewed-on: http://review.gluster.com/632
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-write.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index c6f68a072c3..61aadb920d4 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -103,11 +103,6 @@ afr_create_unwind (call_frame_t *frame, xlator_t *this) unwind_buf = &local->cont.create.buf; } - unwind_buf->ia_ino = local->cont.create.ino; - - local->cont.create.preparent.ia_ino = local->cont.create.parent_ino; - local->cont.create.postparent.ia_ino = local->cont.create.parent_ino; - AFR_STACK_UNWIND (create, main_frame, local->op_ret, local->op_errno, local->cont.create.fd, @@ -176,11 +171,6 @@ afr_create_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (local->success_count == 0) { local->cont.create.buf = *buf; - local->cont.create.ino = - afr_itransform (buf->ia_ino, - priv->child_count, - child_index); - if (priv->read_child >= 0) { afr_set_read_child (this, inode, priv->read_child); @@ -190,13 +180,6 @@ afr_create_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - if (child_index == local->first_up_child) { - local->cont.create.ino = - afr_itransform (buf->ia_ino, - priv->child_count, - local->first_up_child); - } - if (child_index == local->read_child_index) { local->cont.create.read_child_buf = *buf; local->cont.create.preparent = *preparent; @@ -384,11 +367,6 @@ afr_mknod_unwind (call_frame_t *frame, xlator_t *this) unwind_buf = &local->cont.mknod.buf; } - unwind_buf->ia_ino = local->cont.mknod.ino; - - local->cont.mknod.preparent.ia_ino = local->cont.mknod.parent_ino; - local->cont.mknod.postparent.ia_ino = local->cont.mknod.parent_ino; - AFR_STACK_UNWIND (mknod, main_frame, local->op_ret, local->op_errno, local->cont.mknod.inode, @@ -426,10 +404,6 @@ afr_mknod_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (local->success_count == 0){ local->cont.mknod.buf = *buf; - local->cont.mknod.ino = - afr_itransform (buf->ia_ino, - priv->child_count, - child_index); if (priv->read_child >= 0) { afr_set_read_child (this, inode, @@ -440,13 +414,6 @@ afr_mknod_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - if (child_index == local->first_up_child) { - local->cont.mknod.ino = - afr_itransform (buf->ia_ino, - priv->child_count, - local->first_up_child); - } - if (child_index == local->read_child_index) { local->cont.mknod.read_child_buf = *buf; local->cont.mknod.preparent = *preparent; @@ -627,11 +594,6 @@ afr_mkdir_unwind (call_frame_t *frame, xlator_t *this) unwind_buf = &local->cont.mkdir.buf; } - unwind_buf->ia_ino = local->cont.mkdir.ino; - - local->cont.mkdir.preparent.ia_ino = local->cont.mkdir.parent_ino; - local->cont.mkdir.postparent.ia_ino = local->cont.mkdir.parent_ino; - AFR_STACK_UNWIND (mkdir, main_frame, local->op_ret, local->op_errno, local->cont.mkdir.inode, @@ -670,11 +632,6 @@ afr_mkdir_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (local->success_count == 0) { local->cont.mkdir.buf = *buf; - local->cont.mkdir.ino = - afr_itransform (buf->ia_ino, - priv->child_count, - child_index); - if (priv->read_child >= 0) { afr_set_read_child (this, inode, priv->read_child); @@ -684,13 +641,6 @@ afr_mkdir_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - if (child_index == local->first_up_child) { - local->cont.mkdir.ino = - afr_itransform (buf->ia_ino, - priv->child_count, - local->first_up_child); - } - if (child_index == local->read_child_index) { local->cont.mkdir.read_child_buf = *buf; local->cont.mkdir.preparent = *preparent; @@ -872,11 +822,6 @@ afr_link_unwind (call_frame_t *frame, xlator_t *this) unwind_buf = &local->cont.link.buf; } - unwind_buf->ia_ino = local->cont.link.ino; - - local->cont.link.preparent.ia_ino = local->cont.link.parent_ino; - local->cont.link.postparent.ia_ino = local->cont.link.parent_ino; - AFR_STACK_UNWIND (link, main_frame, local->op_ret, local->op_errno, local->cont.link.inode, @@ -1102,11 +1047,6 @@ afr_symlink_unwind (call_frame_t *frame, xlator_t *this) unwind_buf = &local->cont.symlink.buf; } - unwind_buf->ia_ino = local->cont.symlink.ino; - - local->cont.symlink.preparent.ia_ino = local->cont.symlink.parent_ino; - local->cont.symlink.postparent.ia_ino = local->cont.symlink.parent_ino; - AFR_STACK_UNWIND (symlink, main_frame, local->op_ret, local->op_errno, local->cont.symlink.inode, @@ -1144,9 +1084,6 @@ afr_symlink_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (local->success_count == 0) { local->cont.symlink.buf = *buf; - local->cont.symlink.ino = - afr_itransform (buf->ia_ino, priv->child_count, - child_index); if (priv->read_child >= 0) { afr_set_read_child (this, inode, @@ -1157,13 +1094,6 @@ afr_symlink_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - if (child_index == local->first_up_child) { - local->cont.symlink.ino = - afr_itransform (buf->ia_ino, - priv->child_count, - local->first_up_child); - } - if (child_index == local->read_child_index) { local->cont.symlink.read_child_buf = *buf; local->cont.symlink.preparent = *preparent; @@ -1344,13 +1274,6 @@ afr_rename_unwind (call_frame_t *frame, xlator_t *this) unwind_buf = &local->cont.rename.buf; } - unwind_buf->ia_ino = local->cont.rename.ino; - - local->cont.rename.preoldparent.ia_ino = local->cont.rename.oldparent_ino; - local->cont.rename.postoldparent.ia_ino = local->cont.rename.oldparent_ino; - local->cont.rename.prenewparent.ia_ino = local->cont.rename.newparent_ino; - local->cont.rename.postnewparent.ia_ino = local->cont.rename.newparent_ino; - AFR_STACK_UNWIND (rename, main_frame, local->op_ret, local->op_errno, unwind_buf, @@ -1561,9 +1484,6 @@ afr_unlink_unwind (call_frame_t *frame, xlator_t *this) UNLOCK (&frame->lock); if (main_frame) { - local->cont.unlink.preparent.ia_ino = local->cont.unlink.parent_ino; - local->cont.unlink.postparent.ia_ino = local->cont.unlink.parent_ino; - AFR_STACK_UNWIND (unlink, main_frame, local->op_ret, local->op_errno, &local->cont.unlink.preparent, @@ -1761,9 +1681,6 @@ afr_rmdir_unwind (call_frame_t *frame, xlator_t *this) UNLOCK (&frame->lock); if (main_frame) { - local->cont.rmdir.preparent.ia_ino = local->cont.rmdir.parent_ino; - local->cont.rmdir.postparent.ia_ino = local->cont.rmdir.parent_ino; - AFR_STACK_UNWIND (rmdir, main_frame, local->op_ret, local->op_errno, &local->cont.rmdir.preparent, |