Skip to content

Commit

Permalink
dm writecache: skip writecache_wait for pmem mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Huaisheng Ye <[email protected]>
Acked-by: Mikulas Patocka <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
LenovoOpenLab authored and snitm committed Sep 5, 2019
1 parent fb16c79 commit 6d19591
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/md/dm-writecache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 6d19591

Please sign in to comment.