summaryrefslogtreecommitdiffstats
path: root/drivers/md/md-cluster.h
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2015-06-24 16:30:32 +0200
committerNeilBrown <neilb@suse.com>2015-07-24 05:37:59 +0200
commit90382ed9afeafd42ef193f0eadc6b2a252d6c24d (patch)
tree3469e56a27837bfe7a01a399baccc90579e46ef6 /drivers/md/md-cluster.h
parentmd-cluster: fix bitmap sub-offset in bitmap_read_sb (diff)
downloadlinux-90382ed9afeafd42ef193f0eadc6b2a252d6c24d.tar.xz
linux-90382ed9afeafd42ef193f0eadc6b2a252d6c24d.zip
Fix read-balancing during node failure
During a node failure, We need to suspend read balancing so that the reads are directed to the first device and stale data is not read. Suspending writes is not required because these would be recorded and synced eventually. A new flag MD_CLUSTER_SUSPEND_READ_BALANCING is set in recover_prep(). area_resyncing() will respond true for the entire devices if this flag is set and the request type is READ. The flag is cleared in recover_done(). Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Reported-By: David Teigland <teigland@redhat.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/md-cluster.h')
-rw-r--r--drivers/md/md-cluster.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md-cluster.h b/drivers/md/md-cluster.h
index 6817ee00e053..00defe2badbc 100644
--- a/drivers/md/md-cluster.h
+++ b/drivers/md/md-cluster.h
@@ -18,7 +18,7 @@ struct md_cluster_operations {
int (*metadata_update_start)(struct mddev *mddev);
int (*metadata_update_finish)(struct mddev *mddev);
int (*metadata_update_cancel)(struct mddev *mddev);
- int (*area_resyncing)(struct mddev *mddev, sector_t lo, sector_t hi);
+ int (*area_resyncing)(struct mddev *mddev, int direction, sector_t lo, sector_t hi);
int (*add_new_disk_start)(struct mddev *mddev, struct md_rdev *rdev);
int (*add_new_disk_finish)(struct mddev *mddev);
int (*new_disk_ack)(struct mddev *mddev, bool ack);