summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2015-09-01 15:31:02 +0530
committerDan Lambright <dlambrig@redhat.com>2015-09-25 05:36:12 -0700
commit6e62efdc6b55982368193b23cf6b337fca4ccd2f (patch)
tree4af8c13ac3634a6f5d4a2f065e9b89747802f34f /xlators/cluster/dht/src/dht-common.h
parent045cb34238e341d68288893b8f040056e138c04e (diff)
cluster/tier: Handle FOPs on files being migrated
Determine which DHT level is responsible for handling fops on a file undergoing migration based on the name of the the linkto xattr set on the file being migrated and process accordingly. Change-Id: I82772e39314d4fe7f2ba0dcf22de0c6a374ee139 BUG: 1265892 Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/12090 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit 470869a954c17f32a3ba43ccda7442f82c0da6b2) Reviewed-on: http://review.gluster.org/12224 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 1b5a0846c63..b1d12c84a9f 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -42,7 +42,7 @@ typedef int (*dht_selfheal_dir_cbk_t) (call_frame_t *frame, void *cookie,
int32_t op_ret, int32_t op_errno,
dict_t *xdata);
typedef int (*dht_defrag_cbk_fn_t) (xlator_t *this, xlator_t *dst_node,
- call_frame_t *frame);
+ call_frame_t *frame, int ret);
typedef int (*dht_refresh_layout_unlock) (call_frame_t *frame, xlator_t *this,
int op_ret);
@@ -121,8 +121,12 @@ struct dht_rebalance_ {
struct iobref *iobref;
struct iovec *vector;
struct iatt stbuf;
+ struct iatt prebuf;
+ struct iatt postbuf;
dht_defrag_cbk_fn_t target_op_fn;
dict_t *xdata;
+ dict_t *xattr;
+ int32_t set;
};
/**
@@ -553,6 +557,8 @@ typedef struct dht_migrate_info {
#define layout_is_sane(layout) ((layout) && (layout->cnt > 0))
+#define we_are_not_migrating(x) ((x) == 1)
+
#define DHT_STACK_UNWIND(fop, frame, params ...) do { \
dht_local_t *__local = NULL; \
xlator_t *__xl = NULL; \
@@ -1083,4 +1089,9 @@ int
dht_build_parent_loc (xlator_t *this, loc_t *parent, loc_t *child,
int32_t *op_errno);
+int32_t dht_set_local_rebalance (xlator_t *this, dht_local_t *local,
+ struct iatt *stbuf,
+ struct iatt *prebuf,
+ struct iatt *postbuf, dict_t *xdata);
+
#endif/* _DHT_H */