summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2015-05-28 16:03:12 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-02 22:33:00 -0700
commitb6eda067d2e2a0b56718ea71522f6c7b06a09f13 (patch)
tree82f5909c06abb4fdbb99d11d3fbe3eefea7b8f2c /xlators/cluster/dht/src/dht-common.h
parentb7842d178a6019bc2c14ecaf18ae5438a46bda29 (diff)
cluster/dht: pass a destination subvol to fop2 variants to avoid races.
The destination subvol used in the fop2 variants is either stored in inode-ctx1 or local->cached_subvol. However, it is not guaranteed that a value stored in these locations before invocation of fop2 is still present after the invocation as these locations are shared among different concurrent operations. So, to preserve the atomicity of "check dst-subvol and invoke fop2 variant if dst-subvol found", we pass down the dst-subvol to fop2 variant. This patch also fixes error handling in some fop2 variants. Change-Id: Icc226228a246d3f223e3463519736c4495b364d2 BUG: 1142423 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/10943 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 87c0fa55898..d37ca6ce425 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -34,9 +34,9 @@
typedef int (*dht_selfheal_dir_cbk_t) (call_frame_t *frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
- dict_t *xdata);
-typedef int (*dht_defrag_cbk_fn_t) (xlator_t *this, call_frame_t *frame,
- int ret);
+ dict_t *xdata);
+typedef int (*dht_defrag_cbk_fn_t) (xlator_t *this, xlator_t *dst_node,
+ call_frame_t *frame);
struct dht_layout {