Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm writecache: skip writecache_wait for pmem mode

The array bio_in_progress[2] only have chance to be increased and
decreased with ssd mode. For pmem mode, they are not involved at all.
So skip writecache_wait_for_ios in writecache_flush for pmem.

Suggested-by: Doris Yu <tyu1@lenovo.com>
Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>

authored by

Huaisheng Ye and committed by
Mike Snitzer
6d195913 fb16c799

+2 -1
+2 -1
drivers/md/dm-writecache.c
··· 726 726 } 727 727 writecache_commit_flushed(wc); 728 728 729 - writecache_wait_for_ios(wc, WRITE); 729 + if (!WC_MODE_PMEM(wc)) 730 + writecache_wait_for_ios(wc, WRITE); 730 731 731 732 wc->seq_count++; 732 733 pmem_assign(sb(wc)->seq_count, cpu_to_le64(wc->seq_count));