<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v3.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/block?h=v3.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/block?h=v3.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-03-21T05:32:06Z</updated>
<entry>
<title>block: free q-&gt;flush_rq in blk_init_allocated_queue error paths</title>
<updated>2014-03-21T05:32:06Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2014-03-20T21:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=708f04d2abf4e90abee61d9ffb1f165038017ecf'/>
<id>urn:sha1:708f04d2abf4e90abee61d9ffb1f165038017ecf</id>
<content type='text'>
Commit 7982e90c3a57 ("block: fix q-&gt;flush_rq NULL pointer crash on
dm-mpath flush") moved an allocation to blk_init_allocated_queue(), but
neglected to free that allocation on the error paths that follow.

Signed-off-by: Dave Jones &lt;davej@fedoraproject.org&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>block: change flush sequence list addition back to front add</title>
<updated>2014-03-09T03:31:31Z</updated>
<author>
<name>Mike Snitzer</name>
<email>msnitzer@redhat.com</email>
</author>
<published>2014-03-09T03:19:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=10beafc190abcc4ad64024a053441520ba116127'/>
<id>urn:sha1:10beafc190abcc4ad64024a053441520ba116127</id>
<content type='text'>
Commit 18741986 inadvertently changed the rq flush insertion
from a head to a tail insertion. Fix that back up.

Signed-off-by: Mike Snitzer &lt;msnitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block: fix q-&gt;flush_rq NULL pointer crash on dm-mpath flush</title>
<updated>2014-03-09T00:20:01Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2014-03-09T00:20:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7982e90c3a574c90b51aa1c77404e7e6189d58d5'/>
<id>urn:sha1:7982e90c3a574c90b51aa1c77404e7e6189d58d5</id>
<content type='text'>
Commit 1874198 ("blk-mq: rework flush sequencing logic") switched
-&gt;flush_rq from being an embedded member of the request_queue structure
to being dynamically allocated in blk_init_queue_node().

Request-based DM multipath doesn't use blk_init_queue_node(), instead it
uses blk_alloc_queue_node() + blk_init_allocated_queue().  Because
commit 1874198 placed the dynamic allocation of -&gt;flush_rq in
blk_init_queue_node() any flush issued to a dm-mpath device would crash
with a NULL pointer, e.g.:

BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [&lt;ffffffff8125037e&gt;] blk_rq_init+0x1e/0xb0
PGD bb3c7067 PUD bb01d067 PMD 0
Oops: 0002 [#1] SMP
...
CPU: 5 PID: 5028 Comm: dt Tainted: G        W  O 3.14.0-rc3.snitm+ #10
...
task: ffff88032fb270e0 ti: ffff880079564000 task.ti: ffff880079564000
RIP: 0010:[&lt;ffffffff8125037e&gt;]  [&lt;ffffffff8125037e&gt;] blk_rq_init+0x1e/0xb0
RSP: 0018:ffff880079565c98  EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000030
RDX: ffff880260c74048 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff880079565ca8 R08: ffff880260aa1e98 R09: 0000000000000001
R10: ffff88032fa78500 R11: 0000000000000246 R12: 0000000000000000
R13: ffff880260aa1de8 R14: 0000000000000650 R15: 0000000000000000
FS:  00007f8d36a2a700(0000) GS:ffff88033fca0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000079b36000 CR4: 00000000000007e0
Stack:
 0000000000000000 ffff880260c74048 ffff880079565cd8 ffffffff81257a47
 ffff880260aa1de8 ffff880260c74048 0000000000000001 0000000000000000
 ffff880079565d08 ffffffff81257c2d 0000000000000000 ffff880260aa1de8
Call Trace:
 [&lt;ffffffff81257a47&gt;] blk_flush_complete_seq+0x2d7/0x2e0
 [&lt;ffffffff81257c2d&gt;] blk_insert_flush+0x1dd/0x210
 [&lt;ffffffff8124ec59&gt;] __elv_add_request+0x1f9/0x320
 [&lt;ffffffff81250681&gt;] ? blk_account_io_start+0x111/0x190
 [&lt;ffffffff81253a4b&gt;] blk_queue_bio+0x25b/0x330
 [&lt;ffffffffa0020bf5&gt;] dm_request+0x35/0x40 [dm_mod]
 [&lt;ffffffff812530c0&gt;] generic_make_request+0xc0/0x100
 [&lt;ffffffff81253173&gt;] submit_bio+0x73/0x140
 [&lt;ffffffff811becdd&gt;] submit_bio_wait+0x5d/0x80
 [&lt;ffffffff81257528&gt;] blkdev_issue_flush+0x78/0xa0
 [&lt;ffffffff811c1f6f&gt;] blkdev_fsync+0x3f/0x60
 [&lt;ffffffff811b7fde&gt;] vfs_fsync_range+0x1e/0x20
 [&lt;ffffffff811b7ffc&gt;] vfs_fsync+0x1c/0x20
 [&lt;ffffffff811b81f1&gt;] do_fsync+0x41/0x80
 [&lt;ffffffff8118874e&gt;] ? SyS_lseek+0x7e/0x80
 [&lt;ffffffff811b8260&gt;] SyS_fsync+0x10/0x20
 [&lt;ffffffff8154c2d2&gt;] system_call_fastpath+0x16/0x1b

Fix this by moving the -&gt;flush_rq allocation from blk_init_queue_node()
to blk_init_allocated_queue().  blk_init_queue_node() also calls
blk_init_allocated_queue() so this change is functionality equivalent
for all blk_init_queue_node() callers.

Reported-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reported-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: add REQ_SYNC early</title>
<updated>2014-03-07T15:15:28Z</updated>
<author>
<name>Shaohua Li</name>
<email>shli@kernel.org</email>
</author>
<published>2014-02-19T12:20:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=739c3eea711a255df5ed1246face0a4dce5e589f'/>
<id>urn:sha1:739c3eea711a255df5ed1246face0a4dce5e589f</id>
<content type='text'>
Add REQ_SYNC early, so rq_dispatched[] in blk_mq_rq_ctx_init
is set correctly.

Signed-off-by: Shaohua Li&lt;shli@fusionio.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>rt,blk,mq: Make blk_mq_cpu_notify_lock a raw spinlock</title>
<updated>2014-03-03T16:34:10Z</updated>
<author>
<name>Mike Galbraith</name>
<email>bitbucket@online.de</email>
</author>
<published>2014-03-03T04:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a26ebef841bac72a4c5776e920496e07b405628'/>
<id>urn:sha1:2a26ebef841bac72a4c5776e920496e07b405628</id>
<content type='text'>
[  365.164040] BUG: sleeping function called from invalid context at kernel/rtmutex.c:674
[  365.164041] in_atomic(): 1, irqs_disabled(): 1, pid: 26, name: migration/1
[  365.164043] no locks held by migration/1/26.
[  365.164044] irq event stamp: 6648
[  365.164056] hardirqs last  enabled at (6647): [&lt;ffffffff8153d377&gt;] restore_args+0x0/0x30
[  365.164062] hardirqs last disabled at (6648): [&lt;ffffffff810ed98d&gt;] multi_cpu_stop+0x9d/0x120
[  365.164070] softirqs last  enabled at (0): [&lt;ffffffff810543bc&gt;] copy_process.part.28+0x6fc/0x1920
[  365.164072] softirqs last disabled at (0): [&lt;          (null)&gt;]           (null)
[  365.164076] CPU: 1 PID: 26 Comm: migration/1 Tainted: GF           N  3.12.12-rt19-0.gcb6c4a2-rt #3
[  365.164078] Hardware name: QCI QSSC-S4R/QSSC-S4R, BIOS QSSC-S4R.QCI.01.00.S013.032920111005 03/29/2011
[  365.164091]  0000000000000001 ffff880a42ea7c30 ffffffff815367e6 ffffffff81a086c0
[  365.164099]  ffff880a42ea7c40 ffffffff8108919c ffff880a42ea7c60 ffffffff8153c24f
[  365.164107]  ffff880a42ea91f0 00000000ffffffe1 ffff880a42ea7c88 ffffffff81297ec0
[  365.164108] Call Trace:
[  365.164119]  [&lt;ffffffff810060b1&gt;] try_stack_unwind+0x191/0x1a0
[  365.164127]  [&lt;ffffffff81004872&gt;] dump_trace+0x92/0x360
[  365.164133]  [&lt;ffffffff81006108&gt;] show_trace_log_lvl+0x48/0x60
[  365.164138]  [&lt;ffffffff81004c18&gt;] show_stack_log_lvl+0xd8/0x1d0
[  365.164143]  [&lt;ffffffff81006160&gt;] show_stack+0x20/0x50
[  365.164153]  [&lt;ffffffff815367e6&gt;] dump_stack+0x54/0x9a
[  365.164163]  [&lt;ffffffff8108919c&gt;] __might_sleep+0xfc/0x140
[  365.164173]  [&lt;ffffffff8153c24f&gt;] rt_spin_lock+0x1f/0x70
[  365.164182]  [&lt;ffffffff81297ec0&gt;] blk_mq_main_cpu_notify+0x20/0x70
[  365.164191]  [&lt;ffffffff81540a1c&gt;] notifier_call_chain+0x4c/0x70
[  365.164201]  [&lt;ffffffff81083499&gt;] __raw_notifier_call_chain+0x9/0x10
[  365.164207]  [&lt;ffffffff810567be&gt;] cpu_notify+0x1e/0x40
[  365.164217]  [&lt;ffffffff81525da2&gt;] take_cpu_down+0x22/0x40
[  365.164223]  [&lt;ffffffff810ed9c6&gt;] multi_cpu_stop+0xd6/0x120
[  365.164229]  [&lt;ffffffff810edd97&gt;] cpu_stopper_thread+0xd7/0x1e0
[  365.164235]  [&lt;ffffffff810863a3&gt;] smpboot_thread_fn+0x203/0x380
[  365.164241]  [&lt;ffffffff8107cbf8&gt;] kthread+0xc8/0xd0
[  365.164250]  [&lt;ffffffff8154440c&gt;] ret_from_fork+0x7c/0xb0
[  365.164429] smpboot: CPU 1 is now offline

Signed-off-by: Mike Galbraith &lt;bitbucket@online.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: support partial I/O completions</title>
<updated>2014-02-21T16:58:49Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2014-02-20T23:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6a25b31315327eef7785b895c354cc45c3f3742'/>
<id>urn:sha1:d6a25b31315327eef7785b895c354cc45c3f3742</id>
<content type='text'>
Add a new blk_mq_end_io_partial function to partially complete requests
as needed by the SCSI layer.  We do this by reusing blk_update_request
to advance the bio instead of having a simplified version of it in
the blk-mq code.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: merge blk_mq_insert_request and blk_mq_run_request</title>
<updated>2014-02-21T16:58:48Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2014-02-20T23:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=feb71dae1f9e0aeb056f7f639a21e620d327fc66'/>
<id>urn:sha1:feb71dae1f9e0aeb056f7f639a21e620d327fc66</id>
<content type='text'>
It's almost identical to blk_mq_insert_request, so fold the two into one
slightly more generic function by making the flush special case a bit
smarted.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: remove blk_mq_alloc_rq</title>
<updated>2014-02-21T16:58:47Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2014-02-20T23:32:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fd694131bb033e7b1fd748498cd9a70e9c16420b'/>
<id>urn:sha1:fd694131bb033e7b1fd748498cd9a70e9c16420b</id>
<content type='text'>
There's only one caller, which is a straight wrapper and fits the naming
scheme of the related functions a lot better.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2014-02-14T18:45:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-02-14T18:45:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5e57dc81106b942786f5db8e7ab8788bb9319933'/>
<id>urn:sha1:5e57dc81106b942786f5db8e7ab8788bb9319933</id>
<content type='text'>
Pull block IO fixes from Jens Axboe:
 "Second round of updates and fixes for 3.14-rc2.  Most of this stuff
  has been queued up for a while.  The notable exception is the blk-mq
  changes, which are naturally a bit more in flux still.

  The pull request contains:

   - Two bug fixes for the new immutable vecs, causing crashes with raid
     or swap.  From Kent.

   - Various blk-mq tweaks and fixes from Christoph.  A fix for
     integrity bio's from Nic.

   - A few bcache fixes from Kent and Darrick Wong.

   - xen-blk{front,back} fixes from David Vrabel, Matt Rushton, Nicolas
     Swenson, and Roger Pau Monne.

   - Fix for a vec miscount with integrity vectors from Martin.

   - Minor annotations or fixes from Masanari Iida and Rashika Kheria.

   - Tweak to null_blk to do more normal FIFO processing of requests
     from Shlomo Pongratz.

   - Elevator switching bypass fix from Tejun.

   - Softlockup in blkdev_issue_discard() fix when !CONFIG_PREEMPT from
     me"

* 'for-linus' of git://git.kernel.dk/linux-block: (31 commits)
  block: add cond_resched() to potentially long running ioctl discard loop
  xen-blkback: init persistent_purge_work work_struct
  blk-mq: pair blk_mq_start_request / blk_mq_requeue_request
  blk-mq: dont assume rq-&gt;errors is set when returning an error from -&gt;queue_rq
  block: Fix cloning of discard/write same bios
  block: Fix type mismatch in ssize_t_blk_mq_tag_sysfs_show
  blk-mq: rework flush sequencing logic
  null_blk: use blk_complete_request and blk_mq_complete_request
  virtio_blk: use blk_mq_complete_request
  blk-mq: rework I/O completions
  fs: Add prototype declaration to appropriate header file include/linux/bio.h
  fs: Mark function as static in fs/bio-integrity.c
  block/null_blk: Fix completion processing from LIFO to FIFO
  block: Explicitly handle discard/write same segments
  block: Fix nr_vecs for inline integrity vectors
  blk-mq: Add bio_integrity setup to blk_mq_make_request
  blk-mq: initialize sg_reserved_size
  blk-mq: handle dma_drain_size
  blk-mq: divert __blk_put_request for MQ ops
  blk-mq: support at_head inserations for blk_execute_rq
  ...
</content>
</entry>
<entry>
<title>block: add cond_resched() to potentially long running ioctl discard loop</title>
<updated>2014-02-12T16:36:37Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@fb.com</email>
</author>
<published>2014-02-12T16:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c8123f8c9cb517403b51aa41c3c46ff5e10b2c17'/>
<id>urn:sha1:c8123f8c9cb517403b51aa41c3c46ff5e10b2c17</id>
<content type='text'>
When mkfs issues a full device discard and the device only
supports discards of a smallish size, we can loop in
blkdev_issue_discard() for a long time. If preempt isn't enabled,
this can turn into a softlock situation and the kernel will
start complaining.

Add an explicit cond_resched() at the end of the loop to avoid
that.

Cc: stable@kernel.org
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
