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: Huaisheng Ye <yehs1@lenovo.com> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
39495b12ef
commit
a143e172b6
|
@ -849,8 +849,10 @@ static void writecache_discard(struct dm_writecache *wc, sector_t start, sector_
|
|||
|
||||
if (likely(!e->write_in_progress)) {
|
||||
if (!discarded_something) {
|
||||
writecache_wait_for_ios(wc, READ);
|
||||
writecache_wait_for_ios(wc, WRITE);
|
||||
if (!WC_MODE_PMEM(wc)) {
|
||||
writecache_wait_for_ios(wc, READ);
|
||||
writecache_wait_for_ios(wc, WRITE);
|
||||
}
|
||||
discarded_something = true;
|
||||
}
|
||||
if (!writecache_entry_is_committed(wc, e))
|
||||
|
|
Loading…
Reference in New Issue