summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2013-10-31 06:35:47 +0530
committerAnand Avati <avati@redhat.com>2013-11-26 10:27:21 -0800
commit33e0df30cbffbfbda5197704d0f788c83cd7ed78 (patch)
tree5b2c21569301a27481c762148850a44cfdc69528 /xlators/features/marker
parent75f66a98dad3882aff4a68cf0648016101f0a416 (diff)
cluster/dht: instruct marker whenever it shouldn't do accounting
This is needed for two reasons: * since dht-linkfiles are internal, they shouldn't be accounted. * hardlink handling in marker is broken. link/unlink of hardlinks present in same directory can break marker accounting. Hence, if src and dst are in same directory in case of rename, dht - if it breaks rename into link/unlink operations - should instruct marker to not to do accounting. Change-Id: I9c9f7384569f75a2792f6450ee7a5279bf751ae7 BUG: 1022995 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6203 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/src/marker.c42
1 files changed, 2 insertions, 40 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index e448bc08f67..dbe9d530fad 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -820,37 +820,6 @@ out:
int32_t
-marker_unlink_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *buf,
- dict_t *xdata)
-{
- marker_local_t *local = NULL;
-
- local = frame->local;
- if (op_ret < 0) {
- goto err;
- }
-
- if (local == NULL) {
- op_errno = EINVAL;
- goto err;
- }
-
- local->ia_nlink = buf->ia_nlink;
-
- STACK_WIND (frame, marker_unlink_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->unlink, &local->loc, local->xflag,
- local->xdata);
- return 0;
-err:
- frame->local = NULL;
- STACK_UNWIND_STRICT (unlink, frame, -1, op_errno, NULL, NULL, NULL);
- marker_local_unref (local);
- return 0;
-}
-
-
-int32_t
marker_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
dict_t *xdata)
{
@@ -874,18 +843,11 @@ marker_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
if (ret == -1)
goto err;
- if (xdata && dict_get (xdata, GLUSTERFS_INTERNAL_FOP_KEY)) {
+ if (xdata && dict_get (xdata, GLUSTERFS_MARKER_DONT_ACCOUNT_KEY)) {
local->skip_txn = 1;
goto unlink_wind;
}
- if (uuid_is_null (loc->gfid) && loc->inode)
- uuid_copy (loc->gfid, loc->inode->gfid);
-
- STACK_WIND (frame, marker_unlink_stat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->stat, loc, xdata);
- return 0;
-
unlink_wind:
STACK_WIND (frame, marker_unlink_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->unlink, loc, xflag, xdata);
@@ -960,7 +922,7 @@ marker_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
if (ret == -1)
goto err;
- if (xdata && dict_get (xdata, GLUSTERFS_INTERNAL_FOP_KEY))
+ if (xdata && dict_get (xdata, GLUSTERFS_MARKER_DONT_ACCOUNT_KEY))
local->skip_txn = 1;
wind:
STACK_WIND (frame, marker_link_cbk, FIRST_CHILD(this),