1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Huaisheng Ye 2019-09-02 18:04:50 +08:00 committed by Mike Snitzer
parent fb16c799b8
commit 6d1959138c
1 changed files with 2 additions and 1 deletions

View File

@ -726,7 +726,8 @@ static void writecache_flush(struct dm_writecache *wc)
}
writecache_commit_flushed(wc);
writecache_wait_for_ios(wc, WRITE);
if (!WC_MODE_PMEM(wc))
writecache_wait_for_ios(wc, WRITE);
wc->seq_count++;
pmem_assign(sb(wc)->seq_count, cpu_to_le64(wc->seq_count));