diff options
author | N Balachandran <nbalacha@redhat.com> | 2015-09-01 15:31:02 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-09-22 20:56:40 -0700 |
commit | 470869a954c17f32a3ba43ccda7442f82c0da6b2 (patch) | |
tree | 750a45685eff044b43fc739c8d3913e8ceeef8b9 /xlators/cluster/dht/src/dht-common.h | |
parent | bdbd092e2caf79a2cfd6cda507af624e9861ae30 (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: 1254428
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Signed-off-by: Nithya 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>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 13 |
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 6bf8ba1c406..c48bf5800b9 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -37,7 +37,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); @@ -116,8 +116,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; }; /** @@ -548,6 +552,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; \ @@ -1078,4 +1084,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 */ |