Thread (21 messages) 21 messages, 2 authors, 2025-08-28
STALE330d
Revisions (14)
  1. v11 [diff vs current]
  2. v12 [diff vs current]
  3. v13 [diff vs current]
  4. v16 [diff vs current]
  5. v17 [diff vs current]
  6. v18 [diff vs current]
  7. v19 [diff vs current]
  8. v20 [diff vs current]
  9. v21 [diff vs current]
  10. v22 [diff vs current]
  11. v23 [diff vs current]
  12. v24 current
  13. v25 [diff vs current]
  14. v26 [diff vs current]

[PATCH v24 11/18] blk-zoned: Document disk_zone_wplug_schedule_bio_work() locking

From: Bart Van Assche <bvanassche@acm.org>
Date: 2025-08-27 21:30:59
Also in: linux-scsi
Subsystem: block layer, the rest, zoned block device (block layer) · Maintainers: Jens Axboe, Linus Torvalds, Damien Le Moal

Before adding more code in disk_zone_wplug_schedule_bio_work() that depends
on the zone write plug lock being held, document that all callers hold this
lock.

Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 block/blk-zoned.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index eb81278acb38..627a952477d1 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -785,6 +785,8 @@ static bool blk_zone_wplug_handle_reset_all(struct bio *bio)
 static void disk_zone_wplug_schedule_bio_work(struct gendisk *disk,
 					      struct blk_zone_wplug *zwplug)
 {
+	lockdep_assert_held(&zwplug->lock);
+
 	/*
 	 * Take a reference on the zone write plug and schedule the submission
 	 * of the next plugged BIO. blk_zone_wplug_bio_work() will release the
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help