aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-12-13 20:49:56 -0500
committerNeilBrown <neilb@suse.de>2009-12-13 20:51:41 -0500
commitffa23322b1596bb1a115e767d4251b62842adc23 (patch)
tree137daf8289ae910b3c6eb4b38de98cc957f60233 /drivers/md/bitmap.c
parentece5cff0da9e696c360fff592cb5f51b6419e4d6 (diff)
md/bitmap: update dirty flag when bitmap bits are explicitly set.
There is a sysfs file which allows bits in the write-intent bitmap to be explicit set - indicating that the block is thought to be 'dirty'. When this happens we should really set recovery_cp backwards to include the block to reflect this dirtiness. In particular, a 'resync' process will refuse to start if recovery_cp is beyond the end of the array, so this is needed to allow a resync to be triggered. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index de5c42df8d17..26ac8aad0b19 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1566,6 +1566,12 @@ void bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e)
1566 sector_t sec = (sector_t)chunk << CHUNK_BLOCK_SHIFT(bitmap); 1566 sector_t sec = (sector_t)chunk << CHUNK_BLOCK_SHIFT(bitmap);
1567 bitmap_set_memory_bits(bitmap, sec, 1); 1567 bitmap_set_memory_bits(bitmap, sec, 1);
1568 bitmap_file_set_bit(bitmap, sec); 1568 bitmap_file_set_bit(bitmap, sec);
1569 if (sec < bitmap->mddev->recovery_cp)
1570 /* We are asserting that the array is dirty,
1571 * so move the recovery_cp address back so
1572 * that it is obvious that it is dirty
1573 */
1574 bitmap->mddev->recovery_cp = sec;
1569 } 1575 }
1570} 1576}
1571 1577