<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v5.19</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.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-07-14T16:54:49Z</updated>
<entry>
<title>block: fix missing blkcg_bio_issue_init</title>
<updated>2022-07-14T16:54:49Z</updated>
<author>
<name>Muchun Song</name>
<email>songmuchun@bytedance.com</email>
</author>
<published>2022-07-13T14:02:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=957a2b345cbcf41b4b25d471229f0e35262f066c'/>
<id>urn:sha1:957a2b345cbcf41b4b25d471229f0e35262f066c</id>
<content type='text'>
The commit 513616843d73 ("block: remove superfluous calls to
blkcg_bio_issue_init") has removed blkcg_bio_issue_init from
__bio_clone since submit_bio will override -&gt;bi_issue.
However, __blk_queue_split is called after blkcg_bio_issue_init
(see blk_mq_submit_bio) in submit_bio. In this case, the
-&gt;bi_issue is 0. Fix it.

Fixes: 513616843d73 ("block: remove superfluous calls to blkcg_bio_issue_init")
Signed-off-by: Muchun Song &lt;songmuchun@bytedance.com&gt;
Link: https://lore.kernel.org/r/20220713140226.68135-1-songmuchun@bytedance.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: remove WARN_ON() from bd_link_disk_holder</title>
<updated>2022-06-23T13:48:05Z</updated>
<author>
<name>Li Nan</name>
<email>linan122@huawei.com</email>
</author>
<published>2022-06-23T07:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca2a3343d69741dae4df2dbb954fb806d9a835de'/>
<id>urn:sha1:ca2a3343d69741dae4df2dbb954fb806d9a835de</id>
<content type='text'>
Since commit 83cbce957446("block: add error handling for device_add_disk /
add_disk"), bdev-&gt;bd_holder_dir can not be empty now, so remove WARN_ON()
from bd_link_disk_holder.

Signed-off-by: Li Nan &lt;linan122@huawei.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20220623074100.2251301-1-linan122@huawei.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: pop cached rq before potentially blocking rq_qos_throttle()</title>
<updated>2022-06-21T16:59:58Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2022-06-21T16:03:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2645672ffe21f0a1c139bfbc05ad30fd4e4f2583'/>
<id>urn:sha1:2645672ffe21f0a1c139bfbc05ad30fd4e4f2583</id>
<content type='text'>
If rq_qos_throttle() ends up blocking, then we will have invalidated and
flushed our current plug. Since blk_mq_get_cached_request() hasn't
popped the cached request off the plug list just yet, we end holding a
pointer to a request that is no longer valid. This insta-crashes with
rq-&gt;mq_hctx being NULL in the validity checks just after.

Pop the request off the cached list before doing rq_qos_throttle() to
avoid using a potentially stale request.

Fixes: 0a5aa8d161d1 ("block: fix blk_mq_attempt_bio_merge and rq_qos_throttle protection")
Reported-by: Dylan Yudaken &lt;dylany@fb.com&gt;
Tested-by: Dylan Yudaken &lt;dylany@fb.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: remove queue from struct blk_independent_access_range</title>
<updated>2022-06-20T00:40:11Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-06-03T05:35:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9243fc4cd28c8bdddd7fe0abd5bbec3c4fdf5052'/>
<id>urn:sha1:9243fc4cd28c8bdddd7fe0abd5bbec3c4fdf5052</id>
<content type='text'>
The request queue pointer in struct blk_independent_access_range is
unused. Remove it.

Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Fixes: 41e46b3c2aa2 ("block: Fix potential deadlock in blk_ia_range_sysfs_show()")
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20220603053529.76405-1-damien.lemoal@opensource.wdc.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: freeze the queue earlier in del_gendisk</title>
<updated>2022-06-17T13:31:05Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-06-14T07:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a09b314005f3a0956ebf56e01b3b80339df577cc'/>
<id>urn:sha1:a09b314005f3a0956ebf56e01b3b80339df577cc</id>
<content type='text'>
Freeze the queue earlier in del_gendisk so that the state does not
change while we remove debugfs and sysfs files.

Ming mentioned that being able to observer request in debugfs might
be useful while the queue is being frozen in del_gendisk, which is
made possible by this change.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20220614074827.458955-5-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: remove per-disk debugfs files in blk_unregister_queue</title>
<updated>2022-06-17T13:31:05Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-06-14T07:48:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99d055b4fd4bbb309c6cdb51a0d420669f777944'/>
<id>urn:sha1:99d055b4fd4bbb309c6cdb51a0d420669f777944</id>
<content type='text'>
The block debugfs files are created in blk_register_queue, which is
called by add_disk and use a naming scheme based on the disk_name.
After del_gendisk returns that name can be reused and thus we must not
leave these debugfs files around, otherwise the kernel is unhappy
and spews messages like:

	Directory XXXXX with parent 'block' already present!

and the newly created devices will not have working debugfs files.

Move the unregistration to blk_unregister_queue instead (which matches
the sysfs unregistration) to make sure the debugfs life time rules match
those of the disk name.

As part of the move also make sure the whole debugfs unregistration is
inside a single debugfs_mutex critical section.

Note that this breaks blktests block/002, which checks that the debugfs
directory has not been removed while blktests is running, but that
particular check should simply be removed from the test case.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20220614074827.458955-4-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: serialize all debugfs operations using q-&gt;debugfs_mutex</title>
<updated>2022-06-17T13:31:05Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-06-14T07:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cf9c91ba927119fc6606b938b1895bb2459d3bc'/>
<id>urn:sha1:5cf9c91ba927119fc6606b938b1895bb2459d3bc</id>
<content type='text'>
Various places like I/O schedulers or the QOS infrastructure try to
register debugfs files on demans, which can race with creating and
removing the main queue debugfs directory.  Use the existing
debugfs_mutex to serialize all debugfs operations that rely on
q-&gt;debugfs_dir or the directories hanging off it.

To make the teardown code a little simpler declare all debugfs dentry
pointers and not just the main one uncoditionally in blkdev.h.

Move debugfs_mutex next to the dentries that it protects and document
what it is used for.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20220614074827.458955-3-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: disable the elevator int del_gendisk</title>
<updated>2022-06-17T13:31:05Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-06-14T07:48:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50e34d78815e474d410f342fbe783b18192ca518'/>
<id>urn:sha1:50e34d78815e474d410f342fbe783b18192ca518</id>
<content type='text'>
The elevator is only used for file system requests, which are stopped in
del_gendisk.  Move disabling the elevator and freeing the scheduler tags
to the end of del_gendisk instead of doing that work in disk_release and
blk_cleanup_queue to avoid a use after free on q-&gt;tag_set from
disk_release as the tag_set might not be alive at that point.

Move the blk_qos_exit call as well, as it just depends on the elevator
exit and would be the only reason to keep the not exactly cheap queue
freeze in disk_release.

Fixes: e155b0c238b2 ("blk-mq: Use shared tags for shared sbitmap support")
Reported-by: syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.com
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20220614074827.458955-2-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block/bfq: Enable I/O statistics</title>
<updated>2022-06-16T22:59:28Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2022-06-13T16:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b96f3cab59654ee2c30e6adf0b1c13cf8c0850fa'/>
<id>urn:sha1:b96f3cab59654ee2c30e6adf0b1c13cf8c0850fa</id>
<content type='text'>
BFQ uses io_start_time_ns. That member variable is only set if I/O
statistics are enabled. Hence this patch that enables I/O statistics
at the time BFQ is associated with a request queue.

Compile-tested only.

Reported-by: Cixi Geng &lt;cixi.geng1@unisoc.com&gt;
Cc: Cixi Geng &lt;cixi.geng1@unisoc.com&gt;
Cc: Yu Kuai &lt;yukuai3@huawei.com&gt;
Cc: Paolo Valente &lt;paolo.valente@unimore.it&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: don't clear flush_rq from tags-&gt;rqs[]</title>
<updated>2022-06-16T20:45:15Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2022-06-16T01:44:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6cfeadbff3f8905f2854735ebb88e581402c16c4'/>
<id>urn:sha1:6cfeadbff3f8905f2854735ebb88e581402c16c4</id>
<content type='text'>
commit 364b61818f65 ("blk-mq: clearing flush request reference in
tags-&gt;rqs[]") is added to clear the to-be-free flush request from
tags-&gt;rqs[] for avoiding use-after-free on the flush rq.

Yu Kuai reported that blk_mq_clear_flush_rq_mapping() slows down boot time
by ~8s because running scsi probe which may create and remove lots of
unpresent LUNs on megaraid-sas which uses BLK_MQ_F_TAG_HCTX_SHARED and
each request queue has lots of hw queues.

Improve the situation by not running blk_mq_clear_flush_rq_mapping if
disk isn't added when there can't be any flush request issued.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Yu Kuai &lt;yukuai3@huawei.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Link: https://lore.kernel.org/r/20220616014401.817001-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
