aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 95980ad6b27b..0c2ed99a3832 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1345,7 +1345,8 @@ void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long secto
1345 } 1345 }
1346} 1346}
1347 1347
1348int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks) 1348int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks,
1349 int degraded)
1349{ 1350{
1350 bitmap_counter_t *bmc; 1351 bitmap_counter_t *bmc;
1351 int rv; 1352 int rv;
@@ -1362,8 +1363,10 @@ int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks)
1362 rv = 1; 1363 rv = 1;
1363 else if (NEEDED(*bmc)) { 1364 else if (NEEDED(*bmc)) {
1364 rv = 1; 1365 rv = 1;
1365 *bmc |= RESYNC_MASK; 1366 if (!degraded) { /* don't set/clear bits if degraded */
1366 *bmc &= ~NEEDED_MASK; 1367 *bmc |= RESYNC_MASK;
1368 *bmc &= ~NEEDED_MASK;
1369 }
1367 } 1370 }
1368 } 1371 }
1369 spin_unlock_irq(&bitmap->lock); 1372 spin_unlock_irq(&bitmap->lock);