Re: [dm-devel] [PATCH] accessing invalid memory in "dm zoned: properly handle backing device failure"

2019-08-25 Thread Damien Le Moal
On 2019/08/26 15:41, Mikulas Patocka wrote: > The patch 75d66ffb48efb30f2dd42f041ba8b39c5b2bd115 ("dm zoned: properly > handle backing device failure") triggers a coverity warning: > > *** CID 1452808: Memory - illegal accesses (USE_AFTER_FREE) > /drivers/md/dm-zoned-target.c: 137 in dmz_submit

[dm-devel] [PATCH] accessing invalid memory in "dm zoned: properly handle backing device failure"

2019-08-25 Thread Mikulas Patocka
The patch 75d66ffb48efb30f2dd42f041ba8b39c5b2bd115 ("dm zoned: properly handle backing device failure") triggers a coverity warning: *** CID 1452808: Memory - illegal accesses (USE_AFTER_FREE) /drivers/md/dm-zoned-target.c: 137 in dmz_submit_bio() 131 clone->bi_private = bioctx; 132

Re: [PATCH v2] lib/memweight.c: open codes bitmap_weight()

2019-08-25 Thread Denis Efremov
On 25.08.2019 09:11, Matthew Wilcox wrote: > On Sat, Aug 24, 2019 at 01:01:02PM +0300, Denis Efremov wrote: >> This patch open codes the bitmap_weight() call. The direct >> invocation of hweight_long() allows to remove the BUG_ON and >> excessive "longs to bits, bits to longs" conversion. > > H

[PATCH 1/3] dm writecache: remove unused member pointer in writeback_struct

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye The stucture member pointer page in writeback_struct never has been used actually. Remove it. Signed-off-by: Huaisheng Ye Acked-by: Mikulas Patocka --- drivers/md/dm-writecache.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-w

[PATCH 3/3] dm writecache: optimize performance by sorting the blocks for writeback_all

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye During the process of writeback, the blocks, which have been placed in wbl.list for writeback soon, are partially ordered for the contiguous ones. When writeback_all has been set, for most cases, also by default, there will be a lot of blocks in pmem need to writeback at the s

[PATCH 2/3] dm writecache: add unlikely for getting two block with same LBA

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye In function writecache_writeback, entries g and f has same original sector only happens at entry f has been committed, but entry g has NOT yet. The probability of this happening is very low in the following 256 blocks at most of entry e. Signed-off-by: Huaisheng Ye Acked-by:

[PATCH 0/3] optimize writecache_writeback for performance

2019-08-25 Thread Huaisheng Ye
From: Huaisheng Ye Patch 1 and 2 are used for cleaning the code, and they have got Acked-by from Mikulas. Patch 3 is used for performance optimization when writeback_all, which could save more than half of time. Of course, if the blocks in writecache are more uncontinuous and disordered, the mor