<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/block/elevator.c, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-11-17T14:08:56+00:00</updated>
<entry>
<title>block: Fix elevator_get_default() checking for NULL q-&gt;tag_set</title>
<updated>2024-11-17T14:08:56+00:00</updated>
<author>
<name>SurajSonawane2415</name>
<email>surajsonawane0215@gmail.com</email>
</author>
<published>2024-10-07T11:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f49a9d86c4cd2f901544f46e5a77e8009d2a18d0'/>
<id>urn:sha1:f49a9d86c4cd2f901544f46e5a77e8009d2a18d0</id>
<content type='text'>
[ Upstream commit b402328a24ee7193a8ab84277c0c90ae16768126 ]

elevator_get_default() and elv_support_iosched() both check for whether
or not q-&gt;tag_set is non-NULL, however it's not possible for them to be
NULL. This messes up some static checkers, as the checking of tag_set
isn't consistent.

Remove the checks, which both simplifies the logic and avoids checker
errors.

Signed-off-by: SurajSonawane2415 &lt;surajsonawane0215@gmail.com&gt;
Link: https://lore.kernel.org/r/20241007111416.13814-1-surajsonawane0215@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>blk-mq: release scheduler resource when request completes</title>
<updated>2023-08-19T13:47:17+00:00</updated>
<author>
<name>Chengming Zhou</name>
<email>zhouchengming@bytedance.com</email>
</author>
<published>2023-08-13T15:23:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5c0ca13659e9d18f53368d651ed7e6e433ec1cf'/>
<id>urn:sha1:e5c0ca13659e9d18f53368d651ed7e6e433ec1cf</id>
<content type='text'>
Chuck reported [1] an IO hang problem on NFS exports that reside on SATA
devices and bisected to commit 615939a2ae73 ("blk-mq: defer to the normal
submission path for post-flush requests").

We analysed the IO hang problem, found there are two postflush requests
waiting for each other.

The first postflush request completed the REQ_FSEQ_DATA sequence, so go to
the REQ_FSEQ_POSTFLUSH sequence and added in the flush pending list, but
failed to blk_kick_flush() because of the second postflush request which
is inflight waiting in scheduler queue.

The second postflush waiting in scheduler queue can't be dispatched because
the first postflush hasn't released scheduler resource even though it has
completed by itself.

Fix it by releasing scheduler resource when the first postflush request
completed, so the second postflush can be dispatched and completed, then
make blk_kick_flush() succeed.

While at it, remove the check for e-&gt;ops.finish_request, as all
schedulers set that. Reaffirm this requirement by adding a WARN_ON_ONCE()
at scheduler registration time, just like we do for insert_requests and
dispatch_request.

[1] https://lore.kernel.org/all/7A57C7AE-A51A-4254-888B-FE15CA21F9E9@oracle.com/

Link: https://lore.kernel.org/linux-block/20230819031206.2744005-1-chengming.zhou@linux.dev/
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Closes: https://lore.kernel.org/oe-lkp/202308172100.8ce4b853-oliver.sang@intel.com
Fixes: 615939a2ae73 ("blk-mq: defer to the normal submission path for post-flush requests")
Reported-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Chengming Zhou &lt;zhouchengming@bytedance.com&gt;
Tested-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Link: https://lore.kernel.org/r/20230813152325.3017343-1-chengming.zhou@linux.dev
[axboe: folded in incremental fix and added tags]
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Replace all non-returning strlcpy with strscpy</title>
<updated>2023-06-01T15:13:31+00:00</updated>
<author>
<name>Azeem Shaikh</name>
<email>azeemshaikh38@gmail.com</email>
</author>
<published>2023-05-30T15:56:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=20d099756b98fa6b5b838448b1ffbce46f4f3283'/>
<id>urn:sha1:20d099756b98fa6b5b838448b1ffbce46f4f3283</id>
<content type='text'>
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20230530155608.272266-1-azeemshaikh38@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: make kobj_type structures constant</title>
<updated>2023-02-09T16:38:16+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2023-02-08T04:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f6224175fbe4c2b91e303c17af4d4eb5e3a60a7'/>
<id>urn:sha1:5f6224175fbe4c2b91e303c17af4d4eb5e3a60a7</id>
<content type='text'>
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.

Take advantage of this to constify the structure definitions to prevent
modification at runtime.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://lore.kernel.org/r/20230208-kobj_type-block-v1-1-0b3eafd7d983@weissschuh.net
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: untangle request_queue refcounting from sysfs</title>
<updated>2022-11-30T18:09:00+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2022-11-14T04:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2bd85221a625b316114bafaab527770b607095d3'/>
<id>urn:sha1:2bd85221a625b316114bafaab527770b607095d3</id>
<content type='text'>
The kobject embedded into the request_queue is used for the queue
directory in sysfs, but that is a child of the gendisks directory and is
intimately tied to it.  Move this kobject to the gendisk and use a
refcount_t in the request_queue for the actual request_queue refcounting
that is completely unrelated to the device model.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20221114042637.1009333-5-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: use bool as the return type of elv_iosched_allow_bio_merge</title>
<updated>2022-11-29T17:53:10+00:00</updated>
<author>
<name>Jinlong Chen</name>
<email>nickyc975@zju.edu.cn</email>
</author>
<published>2022-11-29T15:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d283ee62b077968e218531b24260e1cc51bd484'/>
<id>urn:sha1:8d283ee62b077968e218531b24260e1cc51bd484</id>
<content type='text'>
We have bool type now, update the old signature.

Signed-off-by: Jinlong Chen &lt;nickyc975@zju.edu.cn&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/0db0a0298758d60d0f4df8b7126ac6a381e5a5bb.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: replace "len+name" with "name+len" in elv_iosched_show</title>
<updated>2022-11-29T17:53:10+00:00</updated>
<author>
<name>Jinlong Chen</name>
<email>nickyc975@zju.edu.cn</email>
</author>
<published>2022-11-29T15:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6451ede406b9f57fcd61d48433a6b8b2be862e3'/>
<id>urn:sha1:c6451ede406b9f57fcd61d48433a6b8b2be862e3</id>
<content type='text'>
The "pointer + offset" pattern is more resonable.

Signed-off-by: Jinlong Chen &lt;nickyc975@zju.edu.cn&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/d9beaee71b14f7b2a39ab0db6458dc0f7d961ceb.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: always use 'e' when printing scheduler name</title>
<updated>2022-11-29T17:53:10+00:00</updated>
<author>
<name>Jinlong Chen</name>
<email>nickyc975@zju.edu.cn</email>
</author>
<published>2022-11-29T15:46:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a3b3660fd30c028e7ae1cd82697933789962406'/>
<id>urn:sha1:7a3b3660fd30c028e7ae1cd82697933789962406</id>
<content type='text'>
Printing e-&gt;elevator_name in all cases improves the readability, and
'e' and 'cur' are identical in this branch.

Suggested-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jinlong Chen &lt;nickyc975@zju.edu.cn&gt;
Link: https://lore.kernel.org/r/4bae180ffbac608ea0cf46ffa9739ce0973b60aa.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: replace continue with else-if in elv_iosched_show</title>
<updated>2022-11-29T17:53:06+00:00</updated>
<author>
<name>Jinlong Chen</name>
<email>nickyc975@zju.edu.cn</email>
</author>
<published>2022-11-29T15:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5998249e3238428156b09911f1606b41113443c5'/>
<id>urn:sha1:5998249e3238428156b09911f1606b41113443c5</id>
<content type='text'>
else-if is more readable than continue here.

Signed-off-by: Jinlong Chen &lt;nickyc975@zju.edu.cn&gt;
Link: https://lore.kernel.org/r/77ac19ba556efd2c8639a6396eb4203c59bc13d6.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: include 'none' for initial elv_iosched_show call</title>
<updated>2022-11-29T17:48:59+00:00</updated>
<author>
<name>Jinlong Chen</name>
<email>nickyc975@zju.edu.cn</email>
</author>
<published>2022-11-29T15:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7919d679ae09c0dc30dfecb7cbc02306cf95cdd7'/>
<id>urn:sha1:7919d679ae09c0dc30dfecb7cbc02306cf95cdd7</id>
<content type='text'>
This makes the printing order of the io schedulers consistent, and removes
a redundant q-&gt;elevator check.

Signed-off-by: Jinlong Chen &lt;nickyc975@zju.edu.cn&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/bdd7083ed4f232e3285f39081e3c5f30b20b8da2.1669736350.git.nickyc975@zju.edu.cn
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
