mbox series

[0/3] Some block sparse fixes

Message ID 20240614090345.655716-1-john.g.garry@oracle.com (mailing list archive)
Headers show
Series Some block sparse fixes | expand

Message

John Garry June 14, 2024, 9:03 a.m. UTC
Branches for-6.11/block and block-6.10 both have the following sparse
build issues:

block/bdev.c:388:17: warning: symbol 'blockdev_mnt' was not declared.
Should it be static?
block/blk-settings.c:266:9: warning: context imbalance in
'queue_limits_commit_update' - wrong count at exit
block/blk-cgroup.c:834:5: warning: context imbalance in
'blkg_conf_prep' - wrong count at exit
block/blk-cgroup.c:965:9: warning: context imbalance in
'blkg_conf_exit' - wrong count at exit
block/blk-iocost.c:732:9: warning: context imbalance in 'iocg_lock' -
wrong count at exit
block/blk-iocost.c:743:28: warning: context imbalance in 'iocg_unlock'
- unexpected unlock
block/blk-zoned.c:595:30: warning: context imbalance in
'disk_get_and_lock_zone_wplug' - wrong count at exit
block/blk-zoned.c: note: in included file (through include/linux/blkdev.h):
./include/linux/bio.h:592:9: warning: context imbalance in
'blk_zone_wplug_handle_write' - unexpected unlock
block/blk-zoned.c:1747:31: warning: context imbalance in
'blk_revalidate_seq_zone' - unexpected unlock
block/bfq-iosched.c:5498:9: warning: context imbalance in
'bfq_exit_icq' - different lock contexts for basic block

This series contains changes to resolve some of those issues. Some issues
are not addressed, as follows:
- for zoned stuff, as mentioned by Damien at [0], they are not worth
  solving
- for blk-iocost.c issues, at [1] Tejun says that lockdep does a better
  job (than sparse)
- for blk-cgroup.c issues, at [2] again Tejun says that lockdep does a
  better job

I am reposting the patch from Jiapeng Chong, as it was never picked up.

[0] https://lore.kernel.org/linux-block/5e04760e-1334-4514-b2d0-be0d7df33865@kernel.org/
[1] https://lore.kernel.org/linux-block/ZmtwqDsMnTJHQB6o@slm.duckdns.org/
[2] https://lore.kernel.org/lkml/Y7x9t+4EwXFl7OwS@slm.duckdns.org/

Jiapeng Chong (1):
  bdev: make blockdev_mnt static

John Garry (2):
  block: Drop locking annotation for limits_lock
  block: BFQ: Refactor bfq_exit_icq() to silence sparse warning

 block/bdev.c           |  2 +-
 block/bfq-iosched.c    | 38 ++++++++++++++++++++------------------
 block/blk-settings.c   |  1 -
 include/linux/blkdev.h |  1 -
 4 files changed, 21 insertions(+), 21 deletions(-)

Comments

Jens Axboe June 16, 2024, 9:30 p.m. UTC | #1
On Fri, 14 Jun 2024 09:03:42 +0000, John Garry wrote:
> Branches for-6.11/block and block-6.10 both have the following sparse
> build issues:
> 
> block/bdev.c:388:17: warning: symbol 'blockdev_mnt' was not declared.
> Should it be static?
> block/blk-settings.c:266:9: warning: context imbalance in
> 'queue_limits_commit_update' - wrong count at exit
> block/blk-cgroup.c:834:5: warning: context imbalance in
> 'blkg_conf_prep' - wrong count at exit
> block/blk-cgroup.c:965:9: warning: context imbalance in
> 'blkg_conf_exit' - wrong count at exit
> block/blk-iocost.c:732:9: warning: context imbalance in 'iocg_lock' -
> wrong count at exit
> block/blk-iocost.c:743:28: warning: context imbalance in 'iocg_unlock'
> - unexpected unlock
> block/blk-zoned.c:595:30: warning: context imbalance in
> 'disk_get_and_lock_zone_wplug' - wrong count at exit
> block/blk-zoned.c: note: in included file (through include/linux/blkdev.h):
> ./include/linux/bio.h:592:9: warning: context imbalance in
> 'blk_zone_wplug_handle_write' - unexpected unlock
> block/blk-zoned.c:1747:31: warning: context imbalance in
> 'blk_revalidate_seq_zone' - unexpected unlock
> block/bfq-iosched.c:5498:9: warning: context imbalance in
> 'bfq_exit_icq' - different lock contexts for basic block
> 
> [...]

Applied, thanks!

[1/3] bdev: make blockdev_mnt static
      commit: d9c2332199d073c5edd7163d64fbdee6224d8c08
[2/3] block: Drop locking annotation for limits_lock
      commit: c3042a5403ef2be622023fcc3b11fc1aa08ba7fa
[3/3] block: BFQ: Refactor bfq_exit_icq() to silence sparse warning
      commit: 66088084fdabb6e5075cd19e8ffe15b8bc7e3708

Best regards,