aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-03-30 20:21:44 -0400
committerNeilBrown <neilb@suse.de>2010-05-18 01:27:57 -0400
commite555190d82c0f58e825e3cbd9e6ebe2e7ac713bd (patch)
treeea9c8e548c4d5eb5fc903bab05af3bda4192ed00 /drivers/md/bitmap.h
parentd754c5ae1ff76b20d3ecde8ad666d7865eada8ae (diff)
md/raid1: delay reads that could overtake behind-writes.
When a raid1 array is configured to support write-behind on some devices, it normally only reads from other devices. If all devices are write-behind (because the rest have failed) it is possible for a read request to be serviced before a behind-write request, which would appear as data corruption. So when forced to read from a WriteMostly device, wait for any write-behind to complete, and don't start any more behind-writes. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.h')
-rw-r--r--drivers/md/bitmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h
index aa82b7caa85f..3797dea4723a 100644
--- a/drivers/md/bitmap.h
+++ b/drivers/md/bitmap.h
@@ -240,6 +240,7 @@ struct bitmap {
240 atomic_t pending_writes; /* pending writes to the bitmap file */ 240 atomic_t pending_writes; /* pending writes to the bitmap file */
241 wait_queue_head_t write_wait; 241 wait_queue_head_t write_wait;
242 wait_queue_head_t overflow_wait; 242 wait_queue_head_t overflow_wait;
243 wait_queue_head_t behind_wait;
243 244
244 struct sysfs_dirent *sysfs_can_clear; 245 struct sysfs_dirent *sysfs_can_clear;
245}; 246};