All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Make all concurrent queue flag manipulations safe
@ 2018-02-28 19:28 Bart Van Assche
  2018-02-28 19:28 ` [PATCH 01/11] block: Reorder the queue flag manipulaton function definitions Bart Van Assche
                   ` (10 more replies)
  0 siblings, 11 replies; 37+ messages in thread
From: Bart Van Assche @ 2018-02-28 19:28 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche

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.

Bart Van Assche (11):
  block: Reorder the queue flag manipulaton 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                              | 17 ++----
 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(+), 221 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2018-03-08  1:02 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 19:28 [PATCH 00/11] Make all concurrent queue flag manipulations safe Bart Van Assche
2018-02-28 19:28 ` [PATCH 01/11] block: Reorder the queue flag manipulaton function definitions Bart Van Assche
2018-03-01  8:42   ` Johannes Thumshirn
2018-03-02 23:09   ` Martin K. Petersen
2018-03-08  1:02     ` Bart Van Assche
2018-02-28 19:28 ` [PATCH 02/11] block: Use the queue_flag_*() functions instead of open-coding these Bart Van Assche
2018-03-01  8:43   ` Johannes Thumshirn
2018-03-02 23:09   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 03/11] block: Introduce blk_queue_flag_{set,clear,test_and_{set,clear}}() Bart Van Assche
2018-03-01  8:46   ` Johannes Thumshirn
2018-03-02 23:11   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 04/11] block: Protect queue flag changes with the queue lock Bart Van Assche
2018-03-01  8:51   ` Johannes Thumshirn
2018-03-01 15:19     ` Bart Van Assche
2018-03-01 15:22       ` Johannes Thumshirn
2018-03-02 23:12   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 05/11] mtip32xx: Use the blk_queue_flag_*() functions Bart Van Assche
2018-03-01  8:52   ` Johannes Thumshirn
2018-03-02 23:12   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 06/11] bcache: Use the blk_queue_flag_{set,clear}() functions Bart Van Assche
2018-02-28 20:18   ` Michael Lyle
2018-03-01  8:52   ` Johannes Thumshirn
2018-03-02 23:12   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 07/11] iscsi: Use blk_queue_flag_set() Bart Van Assche
2018-03-01  8:53   ` Johannes Thumshirn
2018-03-02 23:14   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 08/11] target/tcm_loop: " Bart Van Assche
2018-03-01  8:53   ` Johannes Thumshirn
2018-03-02 23:17   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 09/11] block: Use blk_queue_flag_*() in drivers instead of queue_flag_*() Bart Van Assche
2018-03-02 23:17   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 10/11] block: Complain if queue_flag_(set|clear)_unlocked() is abused Bart Van Assche
2018-03-01  8:57   ` Johannes Thumshirn
2018-03-02 23:18   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 11/11] block: Move the queue_flag_*() functions from a public into a private header file Bart Van Assche
2018-03-01  8:57   ` Johannes Thumshirn
2018-03-02 23:20   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.