<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v3.1-rc9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/block?h=v3.1-rc9</id>
<link rel='self' href='https://git.amat.us/linux/atom/block?h=v3.1-rc9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-09-28T14:07:01Z</updated>
<entry>
<title>block: Free queue resources at blk_release_queue()</title>
<updated>2011-09-28T14:07:01Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2011-09-28T14:07:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=777eb1bf15b8532c396821774bf6451e563438f5'/>
<id>urn:sha1:777eb1bf15b8532c396821774bf6451e563438f5</id>
<content type='text'>
A kernel crash is observed when a mounted ext3/ext4 filesystem is
physically removed. The problem is that blk_cleanup_queue() frees up
some resources eg by calling elevator_exit(), which are not checked for
in normal operation. So we should rather move these calls to the
destructor function blk_release_queue() as at that point all remaining
references are gone. However, in doing so we have to ensure that any
externally supplied queue_lock is disconnected as the driver might free
up the lock after the call of blk_cleanup_queue(),

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-cgroup: be able to remove the record of unplugged device</title>
<updated>2011-09-21T08:22:10Z</updated>
<author>
<name>Wanlong Gao</name>
<email>gaowanlong@cn.fujitsu.com</email>
</author>
<published>2011-09-21T08:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d11bb4462c4cc6ddd45c6927c617ad79fa6fb8fc'/>
<id>urn:sha1:d11bb4462c4cc6ddd45c6927c617ad79fa6fb8fc</id>
<content type='text'>
The bug is we're not able to remove the device from blkio cgroup's
per-device control files if it gets unplugged.

To reproduce the bug:

  # mount -t cgroup -o blkio xxx /cgroup
  # cd /cgroup
  # echo "8:0 1000" &gt; blkio.throttle.read_bps_device
  # unplug the device
  # cat blkio.throttle.read_bps_device
  8:0	1000
  # echo "8:0 0" &gt; blkio.throttle.read_bps_device
  -bash: echo: write error: No such device

After patching, the device removal will succeed.

Thanks for the comments of Paul, Zefan, and Vivek.

Signed-off-by: Wanlong Gao &lt;gaowanlong@cn.fujitsu.com&gt;
Cc: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: Paul Menage &lt;paul@paulmenage.org&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: &lt;stable@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: Don't check QUEUE_FLAG_SAME_COMP in __blk_complete_request</title>
<updated>2011-09-14T07:31:01Z</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2011-09-14T07:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8ad6a56f5679a987bfeacad1bd818a2a381aa98e'/>
<id>urn:sha1:8ad6a56f5679a987bfeacad1bd818a2a381aa98e</id>
<content type='text'>
In __blk_complete_request, we check both QUEUE_FLAG_SAME_COMP and req-&gt;cpu
to decide whether we should use req-&gt;cpu. Actually the user can also
select the complete cpu by either setting BIO_CPU_AFFINE or by calling
bio_set_completion_cpu. Current solution makes these 2 ways don't work
any more. So we'd better just check req-&gt;cpu.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: simplify force plug flush code a little bit</title>
<updated>2011-08-24T14:04:34Z</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2011-08-24T14:04:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=56ebdaf2fa3c5276be201c5d1aff1490b682ecf2'/>
<id>urn:sha1:56ebdaf2fa3c5276be201c5d1aff1490b682ecf2</id>
<content type='text'>
Cleaning up the code a little bit. attempt_plug_merge() traverses the plug
list anyway, we can do the request counting there, so stack size is reduced
a little bit.
The motivation here is I suspect if we should count the requests for each
queue (task could handle multiple disks in the meantime), but my test doesn't
show it's worthy doing. If somebody proves we should do it, below change
will make that more easier.

Signed-off-by: Shaohua Li &lt;shli@kernel.org&gt;
Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: change force plug flush call order</title>
<updated>2011-08-24T14:04:32Z</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2011-08-24T14:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a63271627521b825b0dd0a564e9a9c62b4c1ca89'/>
<id>urn:sha1:a63271627521b825b0dd0a564e9a9c62b4c1ca89</id>
<content type='text'>
Do blk_flush_plug_list() first and then add new request aDo blk_flush_plug_list() first and then add new request aDo blk_flush_plug_list() first and then add new request at the tail. New
request can't be merged to existing requests, but later new requests might
be merged with this new one. If blk_flush_plug_list() is done later, the
merge doesn't happen.
Believe it or not, this fixes a 10% regression running sysbench workload.

Signed-off-by: Shaohua Li &lt;shli@kernel.org&gt;
Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: Fix queue_flag update when rq_affinity goes from 2 to 1</title>
<updated>2011-08-24T06:51:34Z</updated>
<author>
<name>Eric Seppanen</name>
<email>eric@purestorage.com</email>
</author>
<published>2011-08-23T19:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8037d49835482c9534a9a07bed0d0ea831135ae'/>
<id>urn:sha1:e8037d49835482c9534a9a07bed0d0ea831135ae</id>
<content type='text'>
Commit 5757a6d76cdf added the QUEUE_FLAG_SAME_FORCE flag, but fails to
clear that flag when the current state is '2' (SAME_COMP + SAME_FORCE)
and the new state is '1' (SAME_COMP).

Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reviewed-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Eric Seppanen &lt;eric@purestorage.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: separate priority boosting from REQ_META</title>
<updated>2011-08-23T12:50:29Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-08-23T12:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=65299a3b788bd274bed92f9fa3232082c9f3ea70'/>
<id>urn:sha1:65299a3b788bd274bed92f9fa3232082c9f3ea70</id>
<content type='text'>
Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
and lave REQ_META purely for marking requests as metadata in blktrace.

All existing callers of REQ_META except for XFS are updated to also
set REQ_PRIO for now.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2011-08-19T17:47:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-19T17:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5ccc38740a283aba81a00e92941310d0c1aeb2ee'/>
<id>urn:sha1:5ccc38740a283aba81a00e92941310d0c1aeb2ee</id>
<content type='text'>
* 'for-linus' of git://git.kernel.dk/linux-block: (23 commits)
  Revert "cfq: Remove special treatment for metadata rqs."
  block: fix flush machinery for stacking drivers with differring flush flags
  block: improve rq_affinity placement
  blktrace: add FLUSH/FUA support
  Move some REQ flags to the common bio/request area
  allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH
  xen/blkback: Make description more obvious.
  cfq-iosched: Add documentation about idling
  block: Make rq_affinity = 1 work as expected
  block: swim3: fix unterminated of_device_id table
  block/genhd.c: remove useless cast in diskstats_show()
  drivers/cdrom/cdrom.c: relax check on dvd manufacturer value
  drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse
  bsg-lib: add module.h include
  cfq-iosched: Reduce linked group count upon group destruction
  blk-throttle: correctly determine sync bio
  loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other
  loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices
  loop: add management interface for on-demand device allocation
  loop: replace linked list of allocated devices with an idr index
  ...
</content>
</entry>
<entry>
<title>Revert "cfq: Remove special treatment for metadata rqs."</title>
<updated>2011-08-19T06:34:48Z</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2011-08-19T06:34:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b53d1ed734a2b9af8da115b836b658daa7d47a48'/>
<id>urn:sha1:b53d1ed734a2b9af8da115b836b658daa7d47a48</id>
<content type='text'>
We have a kernel build regression since 3.1-rc1, which is about 10%
regression. The kernel source is in an ext3 filesystem.
Alex Shi bisect it to commit:
commit a07405b7802691d29ab3b23bdc76ee6d006aad0b
Author: Justin TerAvest &lt;teravest@google.com&gt;
Date:   Sun Jul 10 22:09:19 2011 +0200

    cfq: Remove special treatment for metadata rqs.

Apparently this is caused by lack metadata preemption, where ext3/ext4
do use READ_META. I didn't see a way to fix the issue, so suggest
reverting the patch.

This reverts commit a07405b7802691d29ab3b23bdc76ee6d006aad0b.

Reported-by: Alex Shi&lt;alex.shi@intel.com&gt;
Reported-by: Shaohua Li&lt;shaohua.li@intel.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: fix flush machinery for stacking drivers with differring flush flags</title>
<updated>2011-08-15T19:37:25Z</updated>
<author>
<name>Jeff Moyer</name>
<email>jmoyer@redhat.com</email>
</author>
<published>2011-08-15T19:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4853abaae7e4a2af938115ce9071ef8684fb7af4'/>
<id>urn:sha1:4853abaae7e4a2af938115ce9071ef8684fb7af4</id>
<content type='text'>
Commit ae1b1539622fb46e51b4d13b3f9e5f4c713f86ae, block: reimplement
FLUSH/FUA to support merge, introduced a performance regression when
running any sort of fsyncing workload using dm-multipath and certain
storage (in our case, an HP EVA).  The test I ran was fs_mark, and it
dropped from ~800 files/sec on ext4 to ~100 files/sec.  It turns out
that dm-multipath always advertised flush+fua support, and passed
commands on down the stack, where those flags used to get stripped off.
The above commit changed that behavior:

static inline struct request *__elv_next_request(struct request_queue *q)
{
        struct request *rq;

        while (1) {
-               while (!list_empty(&amp;q-&gt;queue_head)) {
+               if (!list_empty(&amp;q-&gt;queue_head)) {
                        rq = list_entry_rq(q-&gt;queue_head.next);
-                       if (!(rq-&gt;cmd_flags &amp; (REQ_FLUSH | REQ_FUA)) ||
-                           (rq-&gt;cmd_flags &amp; REQ_FLUSH_SEQ))
-                               return rq;
-                       rq = blk_do_flush(q, rq);
-                       if (rq)
-                               return rq;
+                       return rq;
                }

Note that previously, a command would come in here, have
REQ_FLUSH|REQ_FUA set, and then get handed off to blk_do_flush:

struct request *blk_do_flush(struct request_queue *q, struct request *rq)
{
        unsigned int fflags = q-&gt;flush_flags; /* may change, cache it */
        bool has_flush = fflags &amp; REQ_FLUSH, has_fua = fflags &amp; REQ_FUA;
        bool do_preflush = has_flush &amp;&amp; (rq-&gt;cmd_flags &amp; REQ_FLUSH);
        bool do_postflush = has_flush &amp;&amp; !has_fua &amp;&amp; (rq-&gt;cmd_flags &amp;
        REQ_FUA);
        unsigned skip = 0;
...
        if (blk_rq_sectors(rq) &amp;&amp; !do_preflush &amp;&amp; !do_postflush) {
                rq-&gt;cmd_flags &amp;= ~REQ_FLUSH;
		if (!has_fua)
			rq-&gt;cmd_flags &amp;= ~REQ_FUA;
	        return rq;
	}

So, the flush machinery was bypassed in such cases (q-&gt;flush_flags == 0
&amp;&amp; rq-&gt;cmd_flags &amp; (REQ_FLUSH|REQ_FUA)).

Now, however, we don't get into the flush machinery at all.  Instead,
__elv_next_request just hands a request with flush and fua bits set to
the scsi_request_fn, even if the underlying request_queue does not
support flush or fua.

The agreed upon approach is to fix the flush machinery to allow
stacking.  While this isn't used in practice (since there is only one
request-based dm target, and that target will now reflect the flush
flags of the underlying device), it does future-proof the solution, and
make it function as designed.

In order to make this work, I had to add a field to the struct request,
inside the flush structure (to store the original req-&gt;end_io).  Shaohua
had suggested overloading the union with rb_node and completion_data,
but the completion data is used by device mapper and can also be used by
other drivers.  So, I didn't see a way around the additional field.

I tested this patch on an HP EVA with both ext4 and xfs, and it recovers
the lost performance.  Comments and other testers, as always, are
appreciated.

Cheers,
Jeff

Signed-off-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
</feed>
