Message ID | 20241119002815.600608-17-bvanassche@acm.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Improve write performance for zoned UFS devices | expand |
On 11/19/24 09:28, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche <bvanassche@acm.org> The patch title seems incorrect. This is not documenting anything but adding lockdep checks. With a better patch title: Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
On 11/18/24 11:53 PM, Damien Le Moal wrote: > On 11/19/24 09:28, Bart Van Assche wrote: >> Signed-off-by: Bart Van Assche <bvanassche@acm.org> > > The patch title seems incorrect. This is not documenting anything but adding > lockdep checks. Hmm ... what this patch does is to document what the locking assumptions are for the modified functions. So I'm not sure why the patch title is considered incorrect? Thanks, Bart.
On 11/20/24 06:18, Bart Van Assche wrote: > On 11/18/24 11:53 PM, Damien Le Moal wrote: >> On 11/19/24 09:28, Bart Van Assche wrote: >>> Signed-off-by: Bart Van Assche <bvanassche@acm.org> >> >> The patch title seems incorrect. This is not documenting anything but adding >> lockdep checks. > > Hmm ... what this patch does is to document what the locking assumptions > are for the modified functions. So I'm not sure why the patch title is > considered incorrect? Seeing the word "Document" in the patch title, I expected text/comments. These are lockdep checks so may be just state that, e.g. "Add lockdep checks..." > > Thanks, > > Bart. >
diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 1d0f8fea7516..17fe40db1888 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -441,6 +441,8 @@ static inline void disk_put_zone_wplug(struct blk_zone_wplug *zwplug) static inline bool disk_should_remove_zone_wplug(struct gendisk *disk, struct blk_zone_wplug *zwplug) { + lockdep_assert_held(&zwplug->lock); + /* If the zone write plug was already removed, we are done. */ if (zwplug->flags & BLK_ZONE_WPLUG_UNHASHED) return false; @@ -583,6 +585,8 @@ static inline void disk_zone_wplug_set_error(struct gendisk *disk, { unsigned long flags; + lockdep_assert_held(&zwplug->lock); + if (zwplug->flags & BLK_ZONE_WPLUG_ERROR) return; @@ -933,6 +937,8 @@ static bool blk_zone_wplug_prepare_bio(struct blk_zone_wplug *zwplug, { struct gendisk *disk = bio->bi_bdev->bd_disk; + lockdep_assert_held(&zwplug->lock); + /* * Check that the user is not attempting to write to a full zone. * We know such BIO will fail, and that would potentially overflow our
Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- block/blk-zoned.c | 6 ++++++ 1 file changed, 6 insertions(+)