Skip to content

Commit 5e5dab5

Browse files
Mikulas PatockaMike Snitzer
authored andcommitted
dm integrity: flush the journal on suspend
This commit flushes the journal on suspend. It is prerequisite for the next commit that enables activating dm integrity devices in read-only mode. Note that we deliberately didn't flush the journal on suspend, so that the journal replay code would be tested. However, the dm-integrity code is 5 years old now, so that journal replay is well-tested, and we can make this change now. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 0dfc1f4 commit 5e5dab5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/md/dm-integrity.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,10 +2591,6 @@ static void integrity_writer(struct work_struct *w)
25912591

25922592
unsigned prev_free_sectors;
25932593

2594-
/* the following test is not needed, but it tests the replay code */
2595-
if (unlikely(dm_post_suspending(ic->ti)) && !ic->meta_dev)
2596-
return;
2597-
25982594
spin_lock_irq(&ic->endio_wait.lock);
25992595
write_start = ic->committed_section;
26002596
write_sections = ic->n_committed_sections;
@@ -3101,8 +3097,7 @@ static void dm_integrity_postsuspend(struct dm_target *ti)
31013097
drain_workqueue(ic->commit_wq);
31023098

31033099
if (ic->mode == 'J') {
3104-
if (ic->meta_dev)
3105-
queue_work(ic->writer_wq, &ic->writer_work);
3100+
queue_work(ic->writer_wq, &ic->writer_work);
31063101
drain_workqueue(ic->writer_wq);
31073102
dm_integrity_flush_buffers(ic, true);
31083103
}

0 commit comments

Comments
 (0)