Make all concurrent queue flag manipulations safe
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest11 patches 3 repliesIn review
- v111 patches 25 repliesSuperseded
Changes in v2 from the cover letter
- Restored one test_bit(QUEUE_FLAG_POLL_STATS, &q->queue_flags) call to avoid introducing a slowdown in the polling hot path.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | block: Reorder the queue flag manipulation function definitionsinclude/ | +11 | 0 replies | |
| 2/11 | block: Use the queue_flag_*() functions instead of open-coding theseblock/ block/ block/ +1 more | +7 | 0 replies | |
| 3/11 | block: Introduce blk_queue_flag_{set,clear,test_and_{set,clear}}()block/ block/ block/ +3 more | +93 | 0 replies | |
| 4/11 | block: Protect queue flag changes with the queue lockblock/ block/ | +4 | 1 reply | |
| 5/11 | mtip32xx: Use the blk_queue_flag_*() functionsdrivers/ | +4 | 0 replies | |
| 6/11 | bcache: Use the blk_queue_flag_{set,clear}() functionsdrivers/ | +3 | 0 replies | |
| 7/11 | iscsi: Use blk_queue_flag_set()drivers/ | +1 | 0 replies | |
| 8/11 | target/tcm_loop: Use blk_queue_flag_set()drivers/ | +1 | 0 replies | |
| 9/11 | block: Use blk_queue_flag_*() in drivers instead of queue_flag_*()block/ drivers/ drivers/ +35 more | +89 | 1 reply | |
| 10/11 | block: Complain if queue_flag_(set|clear)_unlocked() is abusedinclude/ | +6 | 0 replies | |
| 11/11 | block: Move the queue_flag_*() functions from a public into a private header fileblock/ include/ | +69 | 0 replies |
Reviews trailers per patch
All 11 patches have a Reviewed-by or Acked-by.
| Patch | Johannes Thumshirn | Martin K. Petersen | Michael Lyle |
|---|---|---|---|
| 1/11 | R-b | R-b | |
| 2/11 | R-b | R-b | |
| 3/11 | R-b | R-b | |
| 4/11 | R-b | R-b | |
| 5/11 | R-b | R-b | |
| 6/11 | R-b | R-b | R-b |
| 7/11 | R-b | A-b | |
| 8/11 | R-b | R-b | |
| 9/11 | R-b | R-b A-b | |
| 10/11 | R-b | R-b | |
| 11/11 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 00/11] Make all concurrent queue flag manipulations safe
Hello Jens,
As you probably know there is considerable confusion in the block layer core and in block drivers about how to protect queue flag changes against concurrent modifications. Some code protects these changes with the queue lock, other code uses atomic operations and some code does not protect queue flag changes against concurrent changes at all. Hence this patch series that protects all queue flag changes consistently with the queue lock and that removes functions that are not safe in a concurrent context from the public block layer header files.
Please consider these patches for kernel v4.17.
Note: it may be a good idea to postpone patch 11 until after the kernel v4.17 merge window to avoid merge conflicts.
Thanks,
Bart.
Changes compared to v1:
- Restored one test_bit(QUEUE_FLAG_POLL_STATS, &q->queue_flags) call to avoid introducing a slowdown in the polling hot path.
Bart Van Assche (11):
block: Reorder the queue flag manipulation function definitions
block: Use the queue_flag_*() functions instead of open-coding these
block: Introduce blk_queue_flag_{set,clear,test_and_{set,clear}}()
block: Protect queue flag changes with the queue lock
mtip32xx: Use the blk_queue_flag_*() functions
bcache: Use the blk_queue_flag_{set,clear}() functions
iscsi: Use blk_queue_flag_set()
target/tcm_loop: Use blk_queue_flag_set()
block: Use blk_queue_flag_*() in drivers instead of queue_flag_*()
block: Complain if queue_flag_(set|clear)_unlocked() is abused
block: Move the queue_flag_*() functions from a public into a private
header file
block/blk-core.c | 93 +++++++++++++++++++++++------ block/blk-mq.c | 16 ++--- block/blk-settings.c | 6 +- block/blk-stat.c | 6 +- block/blk-sysfs.c | 22 +++---- block/blk-timeout.c | 6 +- block/blk.h | 69 +++++++++++++++++++++ block/bsg-lib.c | 4 +- drivers/block/drbd/drbd_nl.c | 4 +- drivers/block/loop.c | 10 ++-- drivers/block/mtip32xx/mtip32xx.c | 8 +-- drivers/block/nbd.c | 8 +-- drivers/block/null_blk.c | 6 +- drivers/block/rbd.c | 4 +- drivers/block/rsxx/dev.c | 6 +- drivers/block/skd_main.c | 4 +- drivers/block/xen-blkfront.c | 10 ++-- drivers/block/zram/zram_drv.c | 6 +- drivers/ide/ide-disk.c | 4 +- drivers/ide/ide-probe.c | 2 +- drivers/lightnvm/pblk-init.c | 2 +- drivers/md/bcache/super.c | 6 +- drivers/md/dm-table.c | 16 ++--- drivers/md/md-linear.c | 4 +- drivers/md/md.c | 4 +- drivers/md/raid0.c | 4 +- drivers/md/raid1.c | 6 +- drivers/md/raid10.c | 6 +- drivers/md/raid5.c | 4 +- drivers/mmc/core/queue.c | 8 +-- drivers/mtd/mtd_blkdevs.c | 6 +- drivers/nvdimm/blk.c | 2 +- drivers/nvdimm/btt.c | 2 +- drivers/nvdimm/pmem.c | 4 +- drivers/nvme/host/core.c | 4 +- drivers/nvme/host/multipath.c | 2 +- drivers/s390/block/dasd.c | 4 +- drivers/s390/block/dcssblk.c | 2 +- drivers/s390/block/scm_blk.c | 4 +- drivers/s390/block/xpram.c | 4 +- drivers/scsi/iscsi_tcp.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- drivers/scsi/scsi_debug.c | 2 +- drivers/scsi/scsi_lib.c | 2 +- drivers/scsi/scsi_transport_sas.c | 4 +- drivers/scsi/sd.c | 8 +-- drivers/target/loopback/tcm_loop.c | 2 +- include/linux/blkdev.h | 76 +++-------------------- 50 files changed, 270 insertions(+), 220 deletions(-)
Signature · 1 line
2.16.2