summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorHuaisheng Ye <yehs1@lenovo.com>2019-09-02 13:04:50 +0300
committerMike Snitzer <snitzer@redhat.com>2019-09-05 20:22:05 +0300
commit6d1959138c8bdaf69f1116c86c77e6733db6ab34 (patch)
tree815b3f36d5696680afc258714a210b5966594bc6 /drivers/md
parentfb16c799b8dca78b847ab183e8aa70e34cbf21bc (diff)
downloadlinux-6d1959138c8bdaf69f1116c86c77e6733db6ab34.tar.xz
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-writecache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index c48194703dbc..d06b8aa41e26 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -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));