Re: [dm-devel] [QUESTION]: multipath device with wrong path lead to metadata err

2021-01-28 Thread lixiaokeng
> >> >> (1)multipath -r: The sdf is found as a path of >> 36001405b7679bd96b094bccbf971bc90 >> (iscsi node is 4:0:0:2) >> Here is a log "dm destory name dm-5; majir:minor 253:5; dm-5" (dm-5 36001405b7679bd96b094bccbf971bc90) in system time [1202538.163972]. I add this print in dm_destroy. >

[dm-devel] [RFC PATCH 02/34] block: introduce and use bio_new

2021-01-28 Thread Chaitanya Kulkarni
Introduce bio_new() helper and use it in blk-lib.c to allocate and initialize various non-optional or semi-optional members of the bio along with bio allocation done with bio_alloc(). Here we also calmp the max_bvecs for bio with BIO_MAX_PAGES before we pass to bio_alloc(). Signed-off-by: Chaitany

[dm-devel] [RFC PATCH 00/34] block: introduce bio_new()

2021-01-28 Thread Chaitanya Kulkarni
Hi, This is a *compile only RFC* which adds a generic helper to initialize the various fields of the bio that is repeated all the places in file-systems, block layer, and drivers. The new helper allows callers to initialize non-optional members of bio such as bdev, sector, op, opflags, max_bvecs

[dm-devel] [RFC PATCH 05/34] xen-blkback: use bio_new

2021-01-28 Thread Chaitanya Kulkarni
Create a wrapper on the tio of the bio_new() named get_new_bio() & use it in the dispatch_rw_block_io(). p Signed-off-by: Chaitanya Kulkarni --- drivers/block/xen-blkback/blkback.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/block/xen-blkback/

Re: [dm-devel] [PATCH v2 5/6] block: add QUEUE_FLAG_POLL_CAP flag

2021-01-28 Thread JeffleXu
On 1/28/21 1:13 AM, Mike Snitzer wrote: > On Mon, Jan 25 2021 at 7:13am -0500, > Jeffle Xu wrote: > >> Introduce QUEUE_FLAG_POLL_CAP flag representing if the request queue >> capable of polling or not. >> >> Signed-off-by: Jeffle Xu > > Why are you adding QUEUE_FLAG_POLL_CAP? Doesn't seem

Re: [dm-devel] [RFC PATCH 28/34] zonefs: use bio_new

2021-01-28 Thread Damien Le Moal
On 2021/01/28 16:15, Chaitanya Kulkarni wrote: > Signed-off-by: Chaitanya Kulkarni > --- > fs/zonefs/super.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c > index ab68e27bb322..620d67965a22 100644 > --- a/fs/zonefs/super.c >

[dm-devel] [RFC PATCH 07/34] dm: use bio_new in dm-log-writes

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-log-writes.c | 30 ++ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c index e3d35c6c9f71..7ca9af407647 100644 --- a/drivers/md/dm-log-writes.c ++

[dm-devel] [RFC PATCH 16/34] fs/direct-io: use bio_new in dio_bio_alloc

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/crypto/bio.c | 2 +- fs/direct-io.c | 6 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c index 20dab9bdf098..28cd62ce853e 100644 --- a/fs/crypto/bio.c +++ b/fs/crypto/bio.c @@ -148,7 +148,7 @@ int fs

[dm-devel] [RFC PATCH 15/34] fscrypt: use bio_new in fscrypt_zeroout_range

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/crypto/bio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c index b048a0e38516..20dab9bdf098 100644 --- a/fs/crypto/bio.c +++ b/fs/crypto/bio.c @@ -148,12 +148,11 @@ int fscrypt_zeroout_range(cons

[dm-devel] [RFC PATCH 32/34] mm: use bio_new in __swap_writepage

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- mm/page_io.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 92f7941c6d01..25b321489703 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -342,10 +342,8 @@ int __swap_writepage(struct page *page, struc

[dm-devel] [RFC PATCH 25/34] ocfs/cluster: use bio_new in dm-log-writes

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/ocfs2/cluster/heartbeat.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 0179a73a3fa2..b34518036446 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluste

[dm-devel] [RFC PATCH 06/34] zram: use bio_new

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/block/zram/zram_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index d7018543842e..5d744e528d4f 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/bloc

[dm-devel] [RFC PATCH 19/34] fs/jfs/jfs_logmgr.c: use bio_new in lbmRead

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_logmgr.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 9330eff210e0..4481f3e33a3f 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -1979,17 +1979,14 @@ static

[dm-devel] [RFC PATCH 08/34] dm-zoned: use bio_new in get_mblock_slow

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-zoned-metadata.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 039d17b28938..e6252f48a49c 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers

[dm-devel] [RFC PATCH 34/34] mm: add swap_bio_new common bio helper

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- mm/page_io.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 7579485ccb5e..cc30c9a0b0a7 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -287,6 +287,17 @@ static void bio_associ

[dm-devel] [RFC PATCH 11/34] nvmet: use bio_new in nvmet_bdev_execute_rw

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/nvme/target/io-cmd-bdev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/nvme/target/io-cmd-bdev.c b/drivers/nvme/target/io-cmd-bdev.c index bf6e0ac9ad28..f5fd93a796a6 100644 --- a/drivers/nvme/target/io-cmd-bdev

Re: [dm-devel] [RFC PATCH 02/34] block: introduce and use bio_new

2021-01-28 Thread Chaitanya Kulkarni
On 1/27/21 11:27 PM, Damien Le Moal wrote: + + bio_set_dev(bio, bdev); + bio->bi_iter.bi_sector = sector; + bio_set_op_attrs(bio, op, op_flags); This function is obsolete. Open code this. And that also mean that you could remove one argument to bio_new(): combine op and op_fl

[dm-devel] [RFC PATCH 23/34] fs/mpage.c: use bio_new mpage_alloc

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/mpage.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/fs/mpage.c b/fs/mpage.c index 830e6cc2a9e7..01725126e81f 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -68,25 +68,21 @@ static struct bio *mpage_bio_submit(int op

[dm-devel] [RFC PATCH 28/34] zonefs: use bio_new

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/zonefs/super.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index ab68e27bb322..620d67965a22 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -661,6 +661,7 @@ static const struct i

[dm-devel] [RFC PATCH 27/34] xfs: use bio_new in xfs_buf_ioapply_map

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/xfs/xfs_buf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index f8400bbd6473..3ff6235e4f94 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1507,12 +1507,10 @@ xfs_buf_ioapply_map(

[dm-devel] [RFC PATCH 24/34] fs/nilfs: use bio_new nilfs_alloc_seg_bio

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/nilfs2/segbuf.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index 1e75417bfe6e..df352cab7a93 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c @@ -383,15 +383,9 @@ static int

[dm-devel] [RFC PATCH 21/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_writepage

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_metapage.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 176580f54af9..3fa09d9a0b94 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -416,12 +416,11 @

[dm-devel] [RFC PATCH 30/34] hfsplus: use bio_new in hfsplus_submit_bio()

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/hfsplus/wrapper.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index 0350dc7821bf..8341ee6c9b31 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c @@ -64,10 +64,7 @@ int hfspl

[dm-devel] [RFC PATCH 31/34] iomap: use bio_new in iomap_readpage_actor

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/iomap/buffered-io.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 16a1e82e3aeb..08d119b62cf5 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -241,6

Re: [dm-devel] [RFC PATCH 02/34] block: introduce and use bio_new

2021-01-28 Thread Damien Le Moal
On 2021/01/28 16:12, Chaitanya Kulkarni wrote: > Introduce bio_new() helper and use it in blk-lib.c to allocate and > initialize various non-optional or semi-optional members of the bio > along with bio allocation done with bio_alloc(). Here we also calmp the > max_bvecs for bio with BIO_MAX_PAGES

Re: [dm-devel] [RFC PATCH 02/34] block: introduce and use bio_new

2021-01-28 Thread Chaitanya Kulkarni
On 1/27/21 11:21 PM, Damien Le Moal wrote: On 2021/01/28 16:12, Chaitanya Kulkarni wrote: Introduce bio_new() helper and use it in blk-lib.c to allocate and initialize various non-optional or semi-optional members of the bio along with bio allocation done with bio_alloc(). Here we also calmp the

[dm-devel] [RFC PATCH 18/34] iomap: use bio_new in iomap_dio_bio_actor

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/iomap/direct-io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index f6c557a1bd25..0737192f7e5c 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -267,9 +267,8 @@ iomap_d

[dm-devel] [RFC PATCH 29/34] power/swap: use bio_new in hib_submit_io

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- kernel/power/swap.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index c73f2e295167..e92e36c053a6 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -271,13 +271,12 @@ static i

[dm-devel] [RFC PATCH 12/34] scsi: target/iblock: use bio_new

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_iblock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 8ed93fd205c7..f1264918aee1 100644 --- a/drivers/target/target_core_ib

Re: [dm-devel] [PATCH v2 0/6] dm: support IO polling for bio-based dm device

2021-01-28 Thread JeffleXu
On 1/28/21 1:19 AM, Mike Snitzer wrote: > On Mon, Jan 25 2021 at 7:13am -0500, > Jeffle Xu wrote: > >> Since currently we have no simple but efficient way to implement the >> bio-based IO polling in the split-bio tracking style, this patch set >> turns to the original implementation mechanism

[dm-devel] [RFC PATCH 01/34] block: move common code into blk_next_bio()

2021-01-28 Thread Chaitanya Kulkarni
blk_next_bio() is the central function which allocates the bios for discard, write-same, write-zeroes and zone-mgmt. The initialization of various bio members is duplicated in disacrd, write-same, write-zeores. In this preparation patch we add bdev, sector, op, and opf arguments to the blk_next_bio

[dm-devel] [RFC PATCH 03/34] drdb: use bio_new in drdb

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/block/drbd/drbd_receiver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 09c86ef3f0fd..e1cd3427b28b 100644 --- a/drivers/block/drbd/drbd_receive

[dm-devel] [RFC PATCH 04/34] drdb: use bio_new() in submit_one_flush

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/block/drbd/drbd_receiver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index e1cd3427b28b..b86bbf725cbd 100644 --- a/drivers/block/drbd/drbd_receive

[dm-devel] [RFC PATCH 10/34] dm-zoned: use bio_new in dmz_rdwr_block

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-zoned-metadata.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index fa0ee732c6e9..5b5ed5fce2ed 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers

[dm-devel] [RFC PATCH 14/34] fs/buffer: use bio_new in submit_bh_wbc

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/buffer.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 32647d2011df..fcbea667fa04 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3023,12 +3023,16 @@ static int submit_bh_wbc(int op, int

[dm-devel] [RFC PATCH 20/34] fs/jfs/jfs_logmgr.c: use bio_new in lbmStartIO

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_logmgr.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 4481f3e33a3f..bb25737d52f6 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -2121,16 +2121,14 @@ static

[dm-devel] [RFC PATCH 33/34] mm: use bio_new in swap_readpage

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- mm/page_io.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 25b321489703..7579485ccb5e 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -342,7 +342,7 @@ int __swap_writepage(struct page *page, stru

Re: [dm-devel] [RFC PATCH 02/34] block: introduce and use bio_new

2021-01-28 Thread Damien Le Moal
On 2021/01/28 16:21, Damien Le Moal wrote: > On 2021/01/28 16:12, Chaitanya Kulkarni wrote: >> Introduce bio_new() helper and use it in blk-lib.c to allocate and >> initialize various non-optional or semi-optional members of the bio >> along with bio allocation done with bio_alloc(). Here we also c

[dm-devel] [RFC PATCH 13/34] block: use bio_new in __blkdev_direct_IO

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/block_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 9d4b1a884d76..f3e3247894d7 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -367,6 +367,8 @@ __blkdev_direct_IO(struct kiocb *ioc

[dm-devel] [RFC PATCH 09/34] dm-zoned: use bio_new in dmz_write_mblock

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- drivers/md/dm-zoned-metadata.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index e6252f48a49c..fa0ee732c6e9 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers

[dm-devel] [RFC PATCH 17/34] iomap: use bio_new in iomap_dio_zero

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/iomap/direct-io.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index ea1e8f696076..f6c557a1bd25 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -189,15 +189,13 @@ ioma

[dm-devel] [RFC PATCH 22/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_readpage

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/jfs/jfs_metapage.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 3fa09d9a0b94..c7be3a2773bf 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -495,13 +495,11

[dm-devel] [RFC PATCH 26/34] xfs: use bio_new in xfs_rw_bdev

2021-01-28 Thread Chaitanya Kulkarni
Signed-off-by: Chaitanya Kulkarni --- fs/xfs/xfs_bio_io.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/xfs/xfs_bio_io.c b/fs/xfs/xfs_bio_io.c index e2148f2d5d6b..e4644f22ebe6 100644 --- a/fs/xfs/xfs_bio_io.c +++ b/fs/xfs/xfs_bio_io.c @@ -26,11 +26,8 @@ xfs_rw_bdev

Re: [dm-devel] [PATCH v2 3/6] block: add iopoll method to support bio-based IO polling

2021-01-28 Thread Christoph Hellwig
On Mon, Jan 25, 2021 at 08:13:37PM +0800, Jeffle Xu wrote: > +int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin) Can you split the guts of this function into two separate helpers for the mq vs non-mq case? As is is is a little hard to read and introduced extra branches in the fast

Re: [dm-devel] [QUESTION] multipathd crash when stopping

2021-01-28 Thread lixiaokeng
>> >>    Thanks very much. Your suggestions is very helpful. >>    The problem reproduced and the bug seems that shown in >> https://bugzilla.redhat.com/show_bug.cgi?id=1293594. > > Really? I don't see a connection to your case there. It's about > glusterfs and libgcc... > > Martin > > Hi Mar

Re: [dm-devel] [PATCH v2 3/6] block: add iopoll method to support bio-based IO polling

2021-01-28 Thread Christoph Hellwig
On Thu, Jan 28, 2021 at 07:52:05PM +0800, JeffleXu wrote: > > > On 1/28/21 4:40 PM, Christoph Hellwig wrote: > > On Mon, Jan 25, 2021 at 08:13:37PM +0800, Jeffle Xu wrote: > >> +int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin) > > > > Can you split the guts of this function into

Re: [dm-devel] [QUESTION] multipathd crash when stopping

2021-01-28 Thread Martin Wilck
On Thu, 2021-01-28 at 21:17 +0800, lixiaokeng wrote: > > > > > > >    Thanks very much. Your suggestions is very helpful. > > >    The problem reproduced and the bug seems that shown in > > > https://bugzilla.redhat.com/show_bug.cgi?id=1293594. > > > > Really? I don't see a connection to your ca

[dm-devel] [PATCH 1/2] block: blk_interposer

2021-01-28 Thread Sergei Shtepa
The block layer interposer allows to intercept bio requests. This allows to connect device mapper and other kernel modules to the block device stack on the fly. changes: * new BIO_INTERPOSED bio flag. * new function __submit_bio_interposed() implements the interposers logic. * new functi

[dm-devel] [PATCH 0/2] block: blk_interposer v3

2021-01-28 Thread Sergei Shtepa
Hi all, I`m ready to suggest the blk_interposer again. blk_interposer allows to intercept bio requests, remap bio to another devices or add new bios. This version has support from device mapper. For the dm-linear device creation command, the `noexcl` parameter has been added, which allows to ope

[dm-devel] [PATCH 2/2] [dm] blk_interposer for dm-linear

2021-01-28 Thread Sergei Shtepa
Implement a block interposer for device-mapper to attach to an existing block layer stack. Using the interposer, we can connect the dm-linear to a device with a mounted file system. changes: * the new dm_interposer structure contains blk_interposer to intercept bio from the interposed disk a

Re: [dm-devel] [PATCH 0/2] block: blk_interposer v3

2021-01-28 Thread Damien Le Moal
On 2021/01/29 2:23, Sergei Shtepa wrote: > Hi all, > > I`m ready to suggest the blk_interposer again. > blk_interposer allows to intercept bio requests, remap bio to > another devices or add new bios. > > This version has support from device mapper. > > For the dm-linear device creation command,

[dm-devel] [PATCH 1/3] libmultipath: use 3rd digit as transport_id for expanders

2021-01-28 Thread mwilck
From: Martin Wilck On SAS expanders, node id's have 3 digits. sysfs paths look like this: /sys/devices/pci:80/:80:02.0/:8b:00.0/:8c:09.0/:8f:00.0/host9/port-9:0/expander-9:0/port-9:0:13/expander-9:1/port-9:1:12/expander-9:2/port-9:2:4/end_device-9:2:4/target9:0:29/9:0:29:0/bl

[dm-devel] [PATCH 2/3] libmultipath: sysfs_set_nexus_loss_tmo(): support SAS expanders

2021-01-28 Thread mwilck
From: Martin Wilck With SAS expanders, SAS node names have 3 digits. libmultipath would fail to discover the sas_end_device matching a given SCSI target in this case. Fix it. Signed-off-by: Martin Wilck --- libmultipath/discovery.c | 24 +++- 1 file changed, 19 insertions(+

[dm-devel] [PATCH 0/3] multipath: fixes for SAS expanders and root FS access

2021-01-28 Thread mwilck
From: Martin Wilck Hi Christophe, hi Ben, here are 3 patches I'd like to get reviewed before we create a pull request. The first two are related to complex SAS setups, the second one is to avoid accessing the root file system in a possible dangerous situation. Wrt 2/3: while testing it, I disco

[dm-devel] [PATCH 3/3] multipathd: add code to initalize unwinder

2021-01-28 Thread mwilck
From: Martin Wilck glibc's implementation of pthread_cancel() loads symbols from libgcc_s.so using dlopen() when pthread_cancel() is called for the first time. This happens even with LD_BIND_NOW=1. This may imply the need for file system access when a thread is cancelled, which in the case of mul

[dm-devel] [PATCH] multipathd: avoid crash in uevent_cleanup()

2021-01-28 Thread mwilck
From: Martin Wilck Crashes have been observed in the unwinder stack of uevent_listen(). This can only be explained by "udev" not being a valid object at that time. Be sure to pass a valid pointer, and don't call udev_unref() if it has been set to NULL already. I'm not quite sure how this would c

Re: [dm-devel] [QUESTION] multipathd crash when stopping

2021-01-28 Thread Martin Wilck
On Thu, 2021-01-28 at 21:17 +0800, lixiaokeng wrote: > > This issue seems being different from that I described firstly. > Do you think they are related? > Will udev_device_unref lead to double free about first issue? I just sent a patch, please try that. Martin -- dm-devel mailing list dm-dev

Re: [dm-devel] [QUESTION]: multipath device with wrong path lead to metadata err

2021-01-28 Thread Martin Wilck
On Thu, 2021-01-28 at 16:27 +0800, lixiaokeng wrote: >    I don't know why dm-5 is destoried. I doubt there may be some > issue in the kernel that I add some print. I have test this in > three computers, but the other two have no problem (they have been > runing for 96h and for 48h respectively).

Re: [dm-devel] [PATCH 1/2] block: blk_interposer

2021-01-28 Thread Damien Le Moal
On 2021/01/29 2:23, Sergei Shtepa wrote: > The block layer interposer allows to intercept bio requests. > This allows to connect device mapper and other kernel modules > to the block device stack on the fly. > > changes: > * new BIO_INTERPOSED bio flag. > * new function __submit_bio_interposed

Re: [dm-devel] [PATCH 2/2] [dm] blk_interposer for dm-linear

2021-01-28 Thread Damien Le Moal
On 2021/01/29 2:23, Sergei Shtepa wrote: > Implement a block interposer for device-mapper to attach > to an existing block layer stack. Using the interposer, > we can connect the dm-linear to a device with a mounted > file system. > > changes: > * the new dm_interposer structure contains blk_int