1
0
Fork 0
alistair23-linux/include
Bart Van Assche 6a83e74d21 blk-mq: Introduce blk_mq_quiesce_queue()
blk_mq_quiesce_queue() waits until ongoing .queue_rq() invocations
have finished. This function does *not* wait until all outstanding
requests have finished (this means invocation of request.end_io()).
The algorithm used by blk_mq_quiesce_queue() is as follows:
* Hold either an RCU read lock or an SRCU read lock around
  .queue_rq() calls. The former is used if .queue_rq() does not
  block and the latter if .queue_rq() may block.
* blk_mq_quiesce_queue() first calls blk_mq_stop_hw_queues()
  followed by synchronize_srcu() or synchronize_rcu(). The latter
  call waits for .queue_rq() invocations that started before
  blk_mq_quiesce_queue() was called.
* The blk_mq_hctx_stopped() calls that control whether or not
  .queue_rq() will be called are called with the (S)RCU read lock
  held. This is necessary to avoid race conditions against
  blk_mq_quiesce_queue().

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-02 12:50:19 -06:00
..
acpi Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 19:43:08 -07:00
asm-generic Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-10-14 14:26:58 -07:00
clocksource
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-10-10 11:19:47 +08:00
drm drm/crtc: constify drm_crtc_index parameter 2016-10-10 17:28:58 +02:00
dt-bindings Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2016-10-12 11:05:23 -07:00
keys
kvm ARM: KVM: Support vgic-v3 2016-09-22 13:22:21 +02:00
linux blk-mq: Introduce blk_mq_quiesce_queue() 2016-11-02 12:50:19 -06:00
math-emu
media Linux 4.8 2016-10-05 16:43:53 -03:00
memory
misc
net A single commit converting the mac80211 DocBook template over to Sphinx. 2016-10-14 14:11:22 -07:00
pcmcia
ras
rdma Merge of primary rdma-core code for 4.9 2016-10-09 17:04:33 -07:00
rxrpc rxrpc: Add tracepoint for ACK proposal 2016-09-23 15:49:19 +01:00
scsi block: split out request-only flags into a new namespace 2016-10-28 08:45:17 -06:00
soc powerpc updates for 4.9 #2 2016-10-14 11:07:42 -07:00
sound ASoC: Updates for v4.9 2016-09-30 18:40:40 +02:00
target
trace block,fs: use REQ_* flags directly 2016-11-01 09:43:26 -06:00
uapi blk-zoned: implement ioctls 2016-10-18 10:05:42 -06:00
video fbdev changes for 4.9 2016-10-12 11:01:37 -07:00
xen xen: features and fixes for 4.9-rc0 2016-10-06 11:19:10 -07:00
Kbuild