提交 6d195913 编写于 作者: H Huaisheng Ye 提交者: Mike Snitzer

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: NDoris Yu <tyu1@lenovo.com>
Signed-off-by: NHuaisheng Ye <yehs1@lenovo.com>
Acked-by: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 fb16c799
...@@ -726,7 +726,8 @@ static void writecache_flush(struct dm_writecache *wc) ...@@ -726,7 +726,8 @@ static void writecache_flush(struct dm_writecache *wc)
} }
writecache_commit_flushed(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++; wc->seq_count++;
pmem_assign(sb(wc)->seq_count, cpu_to_le64(wc->seq_count)); pmem_assign(sb(wc)->seq_count, cpu_to_le64(wc->seq_count));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册