diff options
Diffstat (limited to 'drivers/md/dm-log.c')
-rw-r--r-- | drivers/md/dm-log.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index 6b23631db5b5..d779f8c915dd 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c | |||
@@ -210,6 +210,7 @@ struct log_c { | |||
210 | struct dm_target *ti; | 210 | struct dm_target *ti; |
211 | int touched_dirtied; | 211 | int touched_dirtied; |
212 | int touched_cleaned; | 212 | int touched_cleaned; |
213 | int flush_failed; | ||
213 | uint32_t region_size; | 214 | uint32_t region_size; |
214 | unsigned int region_count; | 215 | unsigned int region_count; |
215 | region_t sync_count; | 216 | region_t sync_count; |
@@ -394,6 +395,7 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti, | |||
394 | lc->ti = ti; | 395 | lc->ti = ti; |
395 | lc->touched_dirtied = 0; | 396 | lc->touched_dirtied = 0; |
396 | lc->touched_cleaned = 0; | 397 | lc->touched_cleaned = 0; |
398 | lc->flush_failed = 0; | ||
397 | lc->region_size = region_size; | 399 | lc->region_size = region_size; |
398 | lc->region_count = region_count; | 400 | lc->region_count = region_count; |
399 | lc->sync = sync; | 401 | lc->sync = sync; |
@@ -706,7 +708,8 @@ static void core_mark_region(struct dm_dirty_log *log, region_t region) | |||
706 | static void core_clear_region(struct dm_dirty_log *log, region_t region) | 708 | static void core_clear_region(struct dm_dirty_log *log, region_t region) |
707 | { | 709 | { |
708 | struct log_c *lc = (struct log_c *) log->context; | 710 | struct log_c *lc = (struct log_c *) log->context; |
709 | log_set_bit(lc, lc->clean_bits, region); | 711 | if (likely(!lc->flush_failed)) |
712 | log_set_bit(lc, lc->clean_bits, region); | ||
710 | } | 713 | } |
711 | 714 | ||
712 | static int core_get_resync_work(struct dm_dirty_log *log, region_t *region) | 715 | static int core_get_resync_work(struct dm_dirty_log *log, region_t *region) |