Commit a143e172 authored by Huaisheng Ye's avatar Huaisheng Ye Committed by Mike Snitzer

dm writecache: skip writecache_wait when using pmem mode

The array bio_in_progress is only used with ssd mode. So skip
writecache_wait_for_ios in writecache_discard when pmem mode.
Signed-off-by: default avatarHuaisheng Ye <yehs1@lenovo.com>
Acked-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 39495b12
...@@ -849,8 +849,10 @@ static void writecache_discard(struct dm_writecache *wc, sector_t start, sector_ ...@@ -849,8 +849,10 @@ static void writecache_discard(struct dm_writecache *wc, sector_t start, sector_
if (likely(!e->write_in_progress)) { if (likely(!e->write_in_progress)) {
if (!discarded_something) { if (!discarded_something) {
writecache_wait_for_ios(wc, READ); if (!WC_MODE_PMEM(wc)) {
writecache_wait_for_ios(wc, WRITE); writecache_wait_for_ios(wc, READ);
writecache_wait_for_ios(wc, WRITE);
}
discarded_something = true; discarded_something = true;
} }
if (!writecache_entry_is_committed(wc, e)) if (!writecache_entry_is_committed(wc, e))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment