Re: [dm-devel] [PATCH 0/3] blk-mq/dm-rq: support BLK_MQ_F_BLOCKING for dm-rq

2021-12-21 Thread Christoph Hellwig
On Tue, Dec 21, 2021 at 10:14:56PM +0800, Ming Lei wrote: > Hello, > > dm-rq may be built on blk-mq device which marks BLK_MQ_F_BLOCKING, so > dm_mq_queue_rq() may become to sleep current context. > > Fixes the issue by allowing dm-rq to set BLK_MQ_F_BLOCKING in case that > any underlying queue i

[dm-devel] [PATCH 3/3] dm: mark dm queue as blocking if any underlying is blocking

2021-12-21 Thread Ming Lei
dm request based driver doesn't set BLK_MQ_F_BLOCKING, so dm_queue_rq() is supposed to not sleep. However, blk_insert_cloned_request() is used by dm_queue_rq() for queuing underlying request, but the underlying queue may be marked as BLK_MQ_F_BLOCKING, so blk_insert_cloned_request() may become to

[dm-devel] [PATCH 2/3] block: add blk_alloc_disk_srcu

2021-12-21 Thread Ming Lei
Add blk_alloc_disk_srcu() so that we can allocate srcu inside request queue for supporting blocking ->queue_rq(). dm-rq needs this API. Signed-off-by: Ming Lei --- block/genhd.c | 5 +++-- include/linux/genhd.h | 12 2 files changed, 11 insertions(+), 6 deletions(-) diff

[dm-devel] [PATCH 1/3] block: split having srcu from queue blocking

2021-12-21 Thread Ming Lei
Now we reuse queue flag of QUEUE_FLAG_HAS_SRCU for both having srcu and BLK_MQ_F_BLOCKING. Actually they are two things: one is that srcu is allocated inside queue, another is that we need to handle blocking ->queue_rq. So far this way works as expected. dm-rq needs to set BLK_MQ_F_BLOCKING if any

[dm-devel] [PATCH 0/3] blk-mq/dm-rq: support BLK_MQ_F_BLOCKING for dm-rq

2021-12-21 Thread Ming Lei
Hello, dm-rq may be built on blk-mq device which marks BLK_MQ_F_BLOCKING, so dm_mq_queue_rq() may become to sleep current context. Fixes the issue by allowing dm-rq to set BLK_MQ_F_BLOCKING in case that any underlying queue is marked as BLK_MQ_F_BLOCKING. DM request queue is allocated before all

Re: [dm-devel] audit: correct the AUDIT_DM_CTRL and AUDIT_DM_EVENT numbering

2021-12-21 Thread Richard Guy Briggs
On 2021-10-27 17:21, Paul Moore wrote: > On Wed, Oct 27, 2021 at 4:57 PM Mike Snitzer wrote: > > > > On Tue, Oct 26 2021 at 10:22P -0400, > > Paul Moore wrote: > > > > > On Tue, Oct 19, 2021 at 9:17 PM Paul Moore wrote: > > > > On Tue, Oct 19, 2021 at 9:15 PM Paul Moore wrote: > > > > > > > > >