<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/block, branch v3.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-12-29T08:16:28Z</updated>
<entry>
<title>block: fix blk_queue_end_tag()</title>
<updated>2011-12-29T08:16:28Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2011-12-29T08:16:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f2b20d436534f22ccc3f5ad172499fcb013bb315'/>
<id>urn:sha1:f2b20d436534f22ccc3f5ad172499fcb013bb315</id>
<content type='text'>
Commit 5e081591 "block: warn if tag is greater than real_max_depth"
cleaned up blk_queue_end_tag() to warn when the tag is truly invalid
(greater than real_max_depth).  However, it changed behavior in the tag &lt;
max_depth case to not end the request.  Leading to triggering of
BUG_ON(blk_queued_rq(rq)) in the request completion path:

  http://marc.info/?l=linux-kernel&amp;m=132204370518629&amp;w=2

In order to allow blk_queue_resize_tags() to shrink the tag space
blk_queue_end_tag() must always complete tags with a value less than
real_max_depth regardless of the current max_depth.  The comment about
"handling the shrink case" seems to be what prompted changes in this
space, so remove it and BUG on all invalid tags (made even simpler by
Matthew's suggestion to use an unsigned compare).

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Tao Ma &lt;boyu.mt@taobao.com&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Reported-by: Meelis Roos &lt;mroos@ut.ee&gt;
Reported-by: Ed Nadolski &lt;edmund.nadolski@intel.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: re-use existing 'reading' variable instead of checking direction again</title>
<updated>2011-12-21T14:27:24Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2011-12-21T14:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=609f6ea1c9cdfe0c43a927e13205a57d0c266d5a'/>
<id>urn:sha1:609f6ea1c9cdfe0c43a927e13205a57d0c266d5a</id>
<content type='text'>
Signed-off-by: majianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block, cfq: fix empty queue crash caused by request merge</title>
<updated>2011-12-16T13:04:23Z</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2011-12-16T13:04:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6ae0516b8a50ece5d766be608a305707e0450060'/>
<id>urn:sha1:6ae0516b8a50ece5d766be608a305707e0450060</id>
<content type='text'>
All requests of a queue could be merged to other requests of other queue.
Such queue will not have request in it, but it's in service tree. This
will cause kernel oops.
I encounter a BUG_ON() in cfq_dispatch_request() with next patch, but the
issue should exist without the patch.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: don't kick empty queue in blk_drain_queue()</title>
<updated>2011-12-15T19:03:04Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-12-15T19:03:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4eabc941259f9d8c8fb71746d3f30c87e1d9e49b'/>
<id>urn:sha1:4eabc941259f9d8c8fb71746d3f30c87e1d9e49b</id>
<content type='text'>
While probing, fd sets up queue, probes hardware and tears down the
queue if probing fails.  In the process, blk_drain_queue() kicks the
queue which failed to finish initialization and fd is unhappy about
that.

  floppy0: no floppy controllers found
  ------------[ cut here ]------------
  WARNING: at drivers/block/floppy.c:2929 do_fd_request+0xbf/0xd0()
  Hardware name: To Be Filled By O.E.M.
  VFS: do_fd_request called on non-open device
  Modules linked in:
  Pid: 1, comm: swapper Not tainted 3.2.0-rc4-00077-g5983fe2 #2
  Call Trace:
   [&lt;ffffffff81039a6a&gt;] warn_slowpath_common+0x7a/0xb0
   [&lt;ffffffff81039b41&gt;] warn_slowpath_fmt+0x41/0x50
   [&lt;ffffffff813d657f&gt;] do_fd_request+0xbf/0xd0
   [&lt;ffffffff81322b95&gt;] blk_drain_queue+0x65/0x80
   [&lt;ffffffff81322c93&gt;] blk_cleanup_queue+0xe3/0x1a0
   [&lt;ffffffff818a809d&gt;] floppy_init+0xdeb/0xe28
   [&lt;ffffffff818a72b2&gt;] ? daring+0x6b/0x6b
   [&lt;ffffffff810002af&gt;] do_one_initcall+0x3f/0x170
   [&lt;ffffffff81884b34&gt;] kernel_init+0x9d/0x11e
   [&lt;ffffffff810317c2&gt;] ? schedule_tail+0x22/0xa0
   [&lt;ffffffff815dbb14&gt;] kernel_thread_helper+0x4/0x10
   [&lt;ffffffff81884a97&gt;] ? start_kernel+0x2be/0x2be
   [&lt;ffffffff815dbb10&gt;] ? gs_change+0xb/0xb

Avoid it by making blk_drain_queue() kick queue iff dispatch queue has
something on it.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Ralf Hildebrandt &lt;Ralf.Hildebrandt@charite.de&gt;
Reported-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Tested-by: Sergei Trofimovich &lt;slyich@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>cfq-iosched: fix cfq_cic_link() race confition</title>
<updated>2011-12-02T09:07:07Z</updated>
<author>
<name>Yasuaki Ishimatsu</name>
<email>isimatu.yasuaki@jp.fujitsu.com</email>
</author>
<published>2011-12-02T09:07:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5eb46851de3904cd1be9192fdacb8d34deadc1fc'/>
<id>urn:sha1:5eb46851de3904cd1be9192fdacb8d34deadc1fc</id>
<content type='text'>
cfq_cic_link() has race condition. When some processes which shared ioc
issue I/O to same block device simultaneously, cfq_cic_link() returns -EEXIST
sometimes. The race condition might stop I/O by following steps:

step  1: Process A: Issue an I/O to /dev/sda
step  2: Process A: Get an ioc (iocA here) in get_io_context() which does not
		    linked with a cic for the device
step  3: Process A: Get a new cic for the device (cicA here) in
		    cfq_alloc_io_context()

step  4: Process B: Issue an I/O to /dev/sda
step  5: Process B: Get iocA in get_io_context() since process A and B share the
		    same ioc
step  6: Process B: Get a new cic for the device (cicB here) in
		    cfq_alloc_io_context() since iocA has not been linked with a
		    cic for the device yet

step  7: Process A: Link cicA to iocA in cfq_cic_link()
step  8: Process A: Dispatch I/O to driver and finish it

step  9: Process B: Try to link cicB to iocA in cfq_cic_link()
		    But it fails with showing "cfq: cic link failed!" kernel
		    message, since iocA has already linked with cicA at step 7.
step 10: Process B: Wait for finishig I/O in get_request_wait()
		    The function does not wake up, when there is no I/O to the
		    device.

When cfq_cic_link() returns -EEXIST, it means ioc has already linked with cic.
So when cfq_cic_link() return -EEXIST, retry cfq_cic_lookup().

Signed-off-by: Yasuaki Ishimatsu &lt;isimatu.yasuaki@jp.fujitsu.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>cfq-iosched: free cic_index if blkio_alloc_blkg_stats fails</title>
<updated>2011-11-30T14:47:48Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2011-11-30T14:47:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2984ff38ccf6cbc02a7a996a36c7d6f69f3c6146'/>
<id>urn:sha1:2984ff38ccf6cbc02a7a996a36c7d6f69f3c6146</id>
<content type='text'>
If we fail allocating the blkpg stats, we free cfqd and cfgq.
But we need to free the IDA cfqd-&gt;cic_index as well.

Signed-off-by: majianpeng &lt;majianpeng@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: initialize request_queue's numa node during</title>
<updated>2011-11-23T09:59:13Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2011-11-23T09:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5151412dd4338b273afdb107c3772528e9e67d92'/>
<id>urn:sha1:5151412dd4338b273afdb107c3772528e9e67d92</id>
<content type='text'>
struct request_queue is allocated with __GFP_ZERO so its "node" field is
zero before initialization.  This causes an oops if node 0 is offline in
the page allocator because its zonelists are not initialized.  From Dave
Young's dmesg:

	SRAT: Node 1 PXM 2 0-d0000000
	SRAT: Node 1 PXM 2 100000000-330000000
	SRAT: Node 0 PXM 1 330000000-630000000
	Initmem setup node 1 0000000000000000-000000000affb000
	...
	Built 1 zonelists in Node order, mobility grouping on.
	...
	BUG: unable to handle kernel paging request at 0000000000001c08
	IP: [&lt;ffffffff8111c355&gt;] __alloc_pages_nodemask+0xb5/0x870

and __alloc_pages_nodemask+0xb5 translates to a NULL pointer on
zonelist-&gt;_zonerefs.

The fix is to initialize q-&gt;node at the time of allocation so the correct
node is passed to the slab allocator later.

Since blk_init_allocated_queue_node() is no longer needed, merge it with
blk_init_allocated_queue().

[rientjes@google.com: changelog, initializing q-&gt;node]
Cc: stable@vger.kernel.org [2.6.37+]
Reported-by: Dave Young &lt;dyoung@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Tested-by: Dave Young &lt;dyoung@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: add missed trace_block_plug</title>
<updated>2011-11-16T08:21:50Z</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2011-11-16T08:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=019ceb7d5d252ce71001a157cf29f4ac28501b72'/>
<id>urn:sha1:019ceb7d5d252ce71001a157cf29f4ac28501b72</id>
<content type='text'>
After flush plug list, the list has no request, so we need to add a
trace_block_plug().

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Reviewed-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: avoid unnecessary plug list flush</title>
<updated>2011-11-16T08:21:50Z</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2011-11-16T08:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3540d5e89b2ac268fcfc9b07a50a9ba4acc2e5e5'/>
<id>urn:sha1:3540d5e89b2ac268fcfc9b07a50a9ba4acc2e5e5</id>
<content type='text'>
get_request_wait() could sleep and flush the plug list.  If the list is
already flushed, don't flush again.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Reviewed-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Always check length of all iov entries in blk_rq_map_user_iov()</title>
<updated>2011-11-13T18:58:09Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2011-11-13T18:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6b76106d8ef31111d6fc469564b83b5f5542794f'/>
<id>urn:sha1:6b76106d8ef31111d6fc469564b83b5f5542794f</id>
<content type='text'>
Even after commit 5478755616ae2ef1ce144dded589b62b2a50d575
("block: check for proper length of iov entries earlier ...")
we still won't check for zero-length entries after an unaligned
entry.  Remove the break-statement, so all entries are checked.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
