<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v5.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-03-12T13:54:39Z</updated>
<entry>
<title>block: Fix partition support for host aware zoned block devices</title>
<updated>2020-03-12T13:54:39Z</updated>
<author>
<name>Shin'ichiro Kawasaki</name>
<email>shinichiro.kawasaki@wdc.com</email>
</author>
<published>2020-02-21T01:37:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b53df2e7442c73a932fb74228147fb946e531585'/>
<id>urn:sha1:b53df2e7442c73a932fb74228147fb946e531585</id>
<content type='text'>
Commit b72053072c0b ("block: allow partitions on host aware zone
devices") introduced the helper function disk_has_partitions() to check
if a given disk has valid partitions. However, since this function result
directly depends on the disk partition table length rather than the
actual existence of valid partitions in the table, it returns true even
after all partitions are removed from the disk. For host aware zoned
block devices, this results in zone management support to be kept
disabled even after removing all partitions.

Fix this by changing disk_has_partitions() to walk through the partition
table entries and return true if and only if a valid non-zero size
partition is found.

Fixes: b72053072c0b ("block: allow partitions on host aware zone devices")
Cc: stable@vger.kernel.org # 5.5
Reviewed-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Shin'ichiro Kawasaki &lt;shinichiro.kawasaki@wdc.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: insert flush request to the front of dispatch queue</title>
<updated>2020-03-12T13:26:12Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2020-03-12T09:15:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc3200eac4c5eb11c3f34848a014d1f286316310'/>
<id>urn:sha1:cc3200eac4c5eb11c3f34848a014d1f286316310</id>
<content type='text'>
commit 01e99aeca397 ("blk-mq: insert passthrough request into
hctx-&gt;dispatch directly") may change to add flush request to the tail
of dispatch by applying the 'add_head' parameter of
blk_mq_sched_insert_request.

Turns out this way causes performance regression on NCQ controller because
flush is non-NCQ command, which can't be queued when there is any in-flight
NCQ command. When adding flush rq to the front of hctx-&gt;dispatch, it is
easier to introduce extra time to flush rq's latency compared with adding
to the tail of dispatch queue because of S_SCHED_RESTART, then chance of
flush merge is increased, and less flush requests may be issued to
controller.

So always insert flush request to the front of dispatch queue just like
before applying commit 01e99aeca397 ("blk-mq: insert passthrough request
into hctx-&gt;dispatch directly").

Cc: Damien Le Moal &lt;Damien.LeMoal@wdc.com&gt;
Cc: Shinichiro Kawasaki &lt;shinichiro.kawasaki@wdc.com&gt;
Reported-by: Shinichiro Kawasaki &lt;shinichiro.kawasaki@wdc.com&gt;
Fixes: 01e99aeca397 ("blk-mq: insert passthrough request into hctx-&gt;dispatch directly")
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-iocost: fix incorrect vtime comparison in iocg_is_idle()</title>
<updated>2020-03-10T17:37:00Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2020-03-10T17:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dcd6589b11d3b1e71f516a87a7b9646ed356b4c0'/>
<id>urn:sha1:dcd6589b11d3b1e71f516a87a7b9646ed356b4c0</id>
<content type='text'>
vtimes may wrap and time_before/after64() should be used to determine
whether a given vtime is before or after another. iocg_is_idle() was
incorrectly using plain "&lt;" comparison do determine whether done_vtime
is before vtime. Here, the only thing we're interested in is whether
done_vtime matches vtime which indicates that there's nothing in
flight. Let's test for inequality instead.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group()</title>
<updated>2020-03-06T14:00:58Z</updated>
<author>
<name>Carlo Nonato</name>
<email>carlo.nonato95@gmail.com</email>
</author>
<published>2020-03-06T12:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14afc59361976c0ba39e3a9589c3eaa43ebc7e1d'/>
<id>urn:sha1:14afc59361976c0ba39e3a9589c3eaa43ebc7e1d</id>
<content type='text'>
The bfq_find_set_group() function takes as input a blkcg (which represents
a cgroup) and retrieves the corresponding bfq_group, then it updates the
bfq internal group hierarchy (see comments inside the function for why
this is needed) and finally it returns the bfq_group.
In the hierarchy update cycle, the pointer holding the correct bfq_group
that has to be returned is mistakenly used to traverse the hierarchy
bottom to top, meaning that in each iteration it gets overwritten with the
parent of the current group. Since the update cycle stops at root's
children (depth = 2), the overwrite becomes a problem only if the blkcg
describes a cgroup at a hierarchy level deeper than that (depth &gt; 2). In
this case the root's child that happens to be also an ancestor of the
correct bfq_group is returned. The main consequence is that processes
contained in a cgroup at depth greater than 2 are wrongly placed in the
group described above by BFQ.

This commits fixes this problem by using a different bfq_group pointer in
the update cycle in order to avoid the overwrite of the variable holding
the original group reference.

Reported-by: Kwon Je Oh &lt;kwonje.oh2@gmail.com&gt;
Signed-off-by: Carlo Nonato &lt;carlo.nonato95@gmail.com&gt;
Signed-off-by: Paolo Valente &lt;paolo.valente@linaro.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Remove used kblockd_schedule_work_on()</title>
<updated>2020-03-02T14:17:31Z</updated>
<author>
<name>Daniel Wagner</name>
<email>dwagner@suse.de</email>
</author>
<published>2020-03-02T13:24:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e959e5405f34aa92d71d0dd162b969c21742061d'/>
<id>urn:sha1:e959e5405f34aa92d71d0dd162b969c21742061d</id>
<content type='text'>
Commit ee63cfa7fc19 ("block: add kblockd_schedule_work_on()")
introduced the helper in 2016. Remove it because since then no caller
was added.

Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: Remove some unused function arguments</title>
<updated>2020-02-26T17:34:41Z</updated>
<author>
<name>John Garry</name>
<email>john.garry@huawei.com</email>
</author>
<published>2020-02-26T12:10:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cae740a04b4d6d5166f19ee5faf04ea2a1f34b3d'/>
<id>urn:sha1:cae740a04b4d6d5166f19ee5faf04ea2a1f34b3d</id>
<content type='text'>
The struct blk_mq_hw_ctx pointer argument in blk_mq_put_tag(),
blk_mq_poll_nsecs(), and blk_mq_poll_hybrid_sleep() is unused, so remove
it.

Overall obj code size shows a minor reduction, before:
   text	   data	    bss	    dec	    hex	filename
  27306	   1312	      0	  28618	   6fca	block/blk-mq.o
   4303	    272	      0	   4575	   11df	block/blk-mq-tag.o

after:
  27282	   1312	      0	  28594	   6fb2	block/blk-mq.o
   4311	    272	      0	   4583	   11e7	block/blk-mq-tag.o

Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
--
This minor patch had been carried as part of the blk-mq shared tags RFC,
I'd rather not carry it anymore as it required rebasing, so now or never..
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: insert passthrough request into hctx-&gt;dispatch directly</title>
<updated>2020-02-25T01:50:48Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2020-02-25T01:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01e99aeca3979600302913cef3f89076786f32c8'/>
<id>urn:sha1:01e99aeca3979600302913cef3f89076786f32c8</id>
<content type='text'>
For some reason, device may be in one situation which can't handle
FS request, so STS_RESOURCE is always returned and the FS request
will be added to hctx-&gt;dispatch. However passthrough request may
be required at that time for fixing the problem. If passthrough
request is added to scheduler queue, there isn't any chance for
blk-mq to dispatch it given we prioritize requests in hctx-&gt;dispatch.
Then the FS IO request may never be completed, and IO hang is caused.

So passthrough request has to be added to hctx-&gt;dispatch directly
for fixing the IO hang.

Fix this issue by inserting passthrough request into hctx-&gt;dispatch
directly together withing adding FS request to the tail of
hctx-&gt;dispatch in blk_mq_dispatch_rq_list(). Actually we add FS request
to tail of hctx-&gt;dispatch at default, see blk_mq_request_bypass_insert().

Then it becomes consistent with original legacy IO request
path, in which passthrough request is always added to q-&gt;queue_head.

Cc: Dongli Zhang &lt;dongli.zhang@oracle.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Ewan D. Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'block-5.6-2020-02-05' of git://git.kernel.dk/linux-block</title>
<updated>2020-02-06T06:15:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-02-06T06:15:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed535f2c9e00eafdeb57d6310b7c8c5a009a9262'/>
<id>urn:sha1:ed535f2c9e00eafdeb57d6310b7c8c5a009a9262</id>
<content type='text'>
Pull more block updates from Jens Axboe:
 "Some later arrivals, but all fixes at this point:

   - bcache fix series (Coly)

   - Series of BFQ fixes (Paolo)

   - NVMe pull request from Keith with a few minor NVMe fixes

   - Various little tweaks"

* tag 'block-5.6-2020-02-05' of git://git.kernel.dk/linux-block: (23 commits)
  nvmet: update AEN list and array at one place
  nvmet: Fix controller use after free
  nvmet: Fix error print message at nvmet_install_queue function
  brd: check and limit max_part par
  nvme-pci: remove nvmeq-&gt;tags
  nvmet: fix dsm failure when payload does not match sgl descriptor
  nvmet: Pass lockdep expression to RCU lists
  block, bfq: clarify the goal of bfq_split_bfqq()
  block, bfq: get a ref to a group when adding it to a service tree
  block, bfq: remove ifdefs from around gets/puts of bfq groups
  block, bfq: extend incomplete name of field on_st
  block, bfq: get extra ref to prevent a queue from being freed during a group move
  block, bfq: do not insert oom queue into position tree
  block, bfq: do not plug I/O for bfq_queues with no proc refs
  bcache: check return value of prio_read()
  bcache: fix incorrect data type usage in btree_flush_write()
  bcache: add readahead cache policy options via sysfs interface
  bcache: explicity type cast in bset_bkey_last()
  bcache: fix memory corruption in bch_cache_accounting_clear()
  xen/blkfront: limit allocated memory size to actual use case
  ...
</content>
</entry>
<entry>
<title>block, bfq: clarify the goal of bfq_split_bfqq()</title>
<updated>2020-02-03T13:58:15Z</updated>
<author>
<name>Paolo Valente</name>
<email>paolo.valente@linaro.org</email>
</author>
<published>2020-02-03T10:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c92bddee77353a773f0df76115c1a01877ce1eae'/>
<id>urn:sha1:c92bddee77353a773f0df76115c1a01877ce1eae</id>
<content type='text'>
The exact, general goal of the function bfq_split_bfqq() is not that
apparent. Add a comment to make it clear.

Tested-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
Signed-off-by: Paolo Valente &lt;paolo.valente@linaro.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block, bfq: get a ref to a group when adding it to a service tree</title>
<updated>2020-02-03T13:58:15Z</updated>
<author>
<name>Paolo Valente</name>
<email>paolo.valente@linaro.org</email>
</author>
<published>2020-02-03T10:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db37a34c563bf4692b36990ae89005c031385e52'/>
<id>urn:sha1:db37a34c563bf4692b36990ae89005c031385e52</id>
<content type='text'>
BFQ schedules generic entities, which may represent either bfq_queues
or groups of bfq_queues. When an entity is inserted into a service
tree, a reference must be taken, to make sure that the entity does not
disappear while still referred in the tree. Unfortunately, such a
reference is mistakenly taken only if the entity represents a
bfq_queue. This commit takes a reference also in case the entity
represents a group.

Tested-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
Tested-by: Chris Evich &lt;cevich@redhat.com&gt;
Signed-off-by: Paolo Valente &lt;paolo.valente@linaro.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
