diff mbox series

[3/5] rbd: convert to blk_mq_freeze_queue_non_owner

Message ID 20241030124240.230610-4-ming.lei@redhat.com (mailing list archive)
State New
Headers show
Series block: freeze/unfreeze lockdep fixes | expand

Commit Message

Ming Lei Oct. 30, 2024, 12:42 p.m. UTC
rbd just calls blk_mq_freeze_queue() only, and doesn't unfreeze queue in
current context, so convert to blk_mq_freeze_queue_non_owner().

Cc: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 drivers/block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Oct. 30, 2024, 2:44 p.m. UTC | #1
On Wed, Oct 30, 2024 at 08:42:35PM +0800, Ming Lei wrote:
> rbd just calls blk_mq_freeze_queue() only, and doesn't unfreeze queue in
> current context, so convert to blk_mq_freeze_queue_non_owner().

I think the right fix here is to unfreeze after marking the disk
dead.
Ming Lei Oct. 30, 2024, 3:02 p.m. UTC | #2
On Wed, Oct 30, 2024 at 03:44:18PM +0100, Christoph Hellwig wrote:
> On Wed, Oct 30, 2024 at 08:42:35PM +0800, Ming Lei wrote:
> > rbd just calls blk_mq_freeze_queue() only, and doesn't unfreeze queue in
> > current context, so convert to blk_mq_freeze_queue_non_owner().
> 
> I think the right fix here is to unfreeze after marking the disk
> dead.

Looks fine.


Thanks, 
Ming
diff mbox series

Patch

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 9c8b19a22c2a..63c183ecdad9 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -7282,7 +7282,7 @@  static ssize_t do_rbd_remove(const char *buf, size_t count)
 		 * Prevent new IO from being queued and wait for existing
 		 * IO to complete/fail.
 		 */
-		blk_mq_freeze_queue(rbd_dev->disk->queue);
+		blk_mq_freeze_queue_non_owner(rbd_dev->disk->queue);
 		blk_mark_disk_dead(rbd_dev->disk);
 	}