Re: [dm-devel] block: Fix a WRITE SAME BUG_ON

2019-01-31 Thread Christoph Hellwig
On Thu, Jan 31, 2019 at 02:41:52PM -0500, John Dorminy wrote: > > On Wed, Jan 30, 2019 at 09:08:50AM -0500, John Dorminy wrote: > > > (I use WRITE_SAME to fill devices with a particular pattern in order > > > to catch failures to initialize disk structures appropriately, > > > personally, but it's

Re: [dm-devel] block: Fix a WRITE SAME BUG_ON

2019-01-31 Thread John Dorminy
On Thu, Jan 31, 2019 at 5:39 AM Christoph Hellwig wrote: > > On Wed, Jan 30, 2019 at 09:08:50AM -0500, John Dorminy wrote: > > (I use WRITE_SAME to fill devices with a particular pattern in order > > to catch failures to initialize disk structures appropriately, > > personally, but it's just for c

Re: [dm-devel] block: Fix a WRITE SAME BUG_ON

2019-01-31 Thread Christoph Hellwig
On Wed, Jan 30, 2019 at 09:08:50AM -0500, John Dorminy wrote: > (I use WRITE_SAME to fill devices with a particular pattern in order > to catch failures to initialize disk structures appropriately, > personally, but it's just for convenience/speed.) How do you use it? We don't have a user interfa

[dm-devel] [PATCH v3 3/5] dm-writecache: expand pmem_reinit for struct dm_writecache

2019-01-31 Thread Huaisheng Ye
From: Huaisheng Ye When use persistent memory as cache data device, sometimes the super block of pmem has messy data stored in it. That would have risk to lead fn ctr failed to work due to invalid magic or version. Here we expand pmem_reinit to optional parameters in order to solve this issue. W

[dm-devel] [PATCH v3 5/5] dm-writecache: output seq_count within status

2019-01-31 Thread Huaisheng Ye
From: Huaisheng Ye seq_count is important for flush operations, output it within status for debugging and analyzing code behavior. Signed-off-by: Huaisheng Ye --- drivers/md/dm-writecache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-writecache.c b/dri

[dm-devel] [PATCH v3 1/5] dm-writecache: remove unused size to writecache_flush_region

2019-01-31 Thread Huaisheng Ye
From: Huaisheng Ye writecache_flush_region doesn't use size to calculate flush region. That uses _set_bits to mark the region in dirty_bitmap directly. Signed-off-by: Huaisheng Ye --- drivers/md/dm-writecache.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dr

[dm-devel] [PATCH v3 2/5] dm-writecache: get rid of memory_data flush to writecache_flush_entry

2019-01-31 Thread Huaisheng Ye
From: Huaisheng Ye writecache_flush_region only works when SSD mode. If wc->pmem_mode sets, writecache_flush_region doesn't need to be called in writecache_flush_entry. Signed-off-by: Huaisheng Ye --- drivers/md/dm-writecache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/md/dm

[dm-devel] [PATCH v3 4/5] Documentation/device-mapper: add optional parameter reinit

2019-01-31 Thread Huaisheng Ye
From: Huaisheng Ye Add intro and usage guide for reinit. Signed-off-by: Huaisheng Ye --- Documentation/device-mapper/writecache.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/device-mapper/writecache.txt b/Documentation/device-mapper/writecache.txt index 01532b3..25

Re: [dm-devel] block: Fix a WRITE SAME BUG_ON

2019-01-31 Thread zhangxiaoxu (A)
On 1/30/2019 10:08 PM, John Dorminy wrote: Alternately, could possibly WRITE_SAME bios be accepted with the minimum sector size of the stack rather than the max, e.g. 512 in this example rather than 4k? They'd need to have a granularity of the larger sector size, though, presumabily necessitati

[dm-devel] [PATCH v3 0/5] Optimize writecache when using pmem as cache

2019-01-31 Thread Huaisheng Ye
From: Huaisheng Ye This patch set could be used for dm-writecache when use persistent memory as cache data device. Patch 1 and 2 go towards removing unused parameter and codes which actually doesn't really work. Patch 3 and 4 are targeted at solving problem fn ctr failed to work due to invalid