summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2018-01-18 13:06:12 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-02-02 15:24:38 +0000
commit545a7ce6762a1b3a7b989b43a9d18b5b1b299df0 (patch)
tree0f2c3015697553914cb520dbda107f3843521f53 /xlators/cluster/dht/src/dht-common.h
parentd9f773ba719397c12860f494a8cd38109e4b2fe3 (diff)
cluster/dht: avoid overwriting client writes during migration
For more details on this issue see https://github.com/gluster/glusterfs/issues/308 Solution: This is a restrictive solution where a file will not be migrated if a client writes to it during the migration. This does not check if the writes from the rebalance and the client actually do overlap. If dht_writev_cbk finds that the file is being migrated (PHASE1) it will set an xattr on the destination file indicating the file was updated by a non-rebalance client. Rebalance checks if any other client has written to the dst file and aborts the file migration if it finds the xattr. updates gluster/glusterfs#308 Change-Id: I73aec28bc9dbb8da57c7425ec88c6b6af0fbc9dd Signed-off-by: Susant Palai <spalai@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 91ba3418643..9671bbe1cbe 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -695,6 +695,8 @@ struct dht_conf {
synclock_t link_lock;
gf_boolean_t use_fallocate;
+
+ gf_boolean_t force_migration;
};
typedef struct dht_conf dht_conf_t;