summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-04-18 21:53:45 +0000
committerAnand Avati <avati@gluster.com>2011-04-19 02:41:40 -0700
commit450a7be2cede5a44c74f5f74224292af0c81a45f (patch)
treeb537310cc8580325d0f0b8d8039f531e64f71502 /xlators/features/marker
parent3776483431bfcd867a07b83ebd7d303a5d3538b6 (diff)
marker: fixes to bypass marker fops in case features are enabled
mainly in unlink and rename Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2801 (glusterfsd process crash while running rebalance on simple volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2801
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/src/marker.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index dcda5c70d04..640e6faf51e 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -792,7 +792,7 @@ marker_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
priv = this->private;
if (priv->feature_enabled == 0)
- goto wind;
+ goto unlink_wind;
ALLOCATE_OR_GOTO (local, marker_local_t, err);
@@ -802,10 +802,14 @@ marker_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
if (ret == -1)
goto err;
-wind:
+
STACK_WIND (frame, marker_unlink_stat_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->stat, loc);
+ return 0;
+unlink_wind:
+ STACK_WIND (frame, marker_unlink_cbk, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->unlink, loc);
return 0;
err:
STACK_UNWIND_STRICT (unlink, frame, -1, ENOMEM, NULL, NULL);
@@ -951,11 +955,15 @@ marker_quota_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
unwind:
STACK_UNWIND_STRICT (rename, frame, -1, ENOMEM, NULL,
NULL, NULL, NULL, NULL);
- local->oplocal = NULL;
- marker_local_unref (local);
- marker_local_unref (oplocal);
- GF_FREE (local);
- GF_FREE (oplocal);
+ if (local) {
+ local->oplocal = NULL;
+ marker_local_unref (local);
+ GF_FREE (local);
+ }
+ if (oplocal) {
+ marker_local_unref (oplocal);
+ GF_FREE (oplocal);
+ }
return 0;
}
@@ -973,7 +981,7 @@ marker_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
priv = this->private;
if (priv->feature_enabled == 0)
- goto wind;
+ goto rename_wind;
GET_CONTRI_KEY (contri_key, oldloc->parent->gfid, ret);
if (ret < 0)
@@ -998,11 +1006,16 @@ marker_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
ret = loc_copy (&oplocal->loc, oldloc);
if (ret == -1)
goto err;
-wind:
STACK_WIND (frame, marker_quota_removexattr_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->removexattr, oldloc, contri_key);
return 0;
+
+rename_wind:
+ STACK_WIND (frame, marker_rename_cbk, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->rename, oldloc, newloc);
+
+ return 0;
err:
STACK_UNWIND_STRICT (rename, frame, -1, ENOMEM, NULL,
NULL, NULL, NULL, NULL);