anolis-cloud-kernel/drivers/lightnvm
Christoph Hellwig b8f1c9a55b block: switch polling to be bio based
ANBZ: #11744

commit 3e08773c38 upstream.

Replace the blk_poll interface that requires the caller to keep a queue
and cookie from the submissions with polling based on the bio.

Polling for the bio itself leads to a few advantages:

 - the cookie construction can made entirely private in blk-mq.c
 - the caller does not need to remember the request_queue and cookie
   separately and thus sidesteps their lifetime issues
 - keeping the device and the cookie inside the bio allows to trivially
   support polling BIOs remapping by stacking drivers
 - a lot of code to propagate the cookie back up the submission path can
   be removed entirely.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Mark Wunderlich <mark.wunderlich@intel.com>
Link: https://lore.kernel.org/r/20211012111226.760968-15-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[joe: fix all conflicts for *submit_bio() and blk_poll()]
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/4084
2024-11-26 01:40:15 +00:00
..
Kconfig lightnvm: disable the subsystem 2022-05-09 09:04:56 +02:00
Makefile
core.c lightnvm: fix memory leak when submit fails 2021-01-27 11:55:22 +01:00
pblk-cache.c lightnvm/pblk: use bio_{start,end}_io_acct 2020-05-27 05:21:23 -06:00
pblk-core.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pblk-gc.c lightnvm: pblk: use kvmalloc for metadata 2019-08-06 08:20:10 -06:00
pblk-init.c block: switch polling to be bio based 2024-11-26 01:40:15 +00:00
pblk-map.c
pblk-rb.c
pblk-read.c block: rename generic_make_request to submit_bio_noacct 2020-07-01 07:27:24 -06:00
pblk-recovery.c lightnvm: remove set but not used variables 'data_len' and 'rq_len' 2019-08-08 07:34:34 -06:00
pblk-rl.c
pblk-sysfs.c lightnvm: pblk: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 07:39:05 -06:00
pblk-trace.h ftrace: Rework event_create_dir() 2019-11-27 07:44:25 +01:00
pblk-write.c
pblk.h lightnvm: pblk: use kvmalloc for metadata 2019-08-06 08:20:10 -06:00