Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GIT PULL] io_uring updates for 5.16-rc1 #6

Merged
merged 205 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
3c08b09
blk-cgroup: blk_cgroup_bio_start() should use irq-safe operations on …
htejun Oct 14, 2021
348332e
mm: don't include <linux/blk-cgroup.h> in <linux/writeback.h>
Sep 20, 2021
e41d12f
mm: don't include <linux/blk-cgroup.h> in <linux/backing-dev.h>
Sep 20, 2021
ccdf774
mm: don't include <linux/blkdev.h> in <linux/backing-dev.h>
Sep 20, 2021
518d550
mm: remove spurious blkdev.h includes
Sep 20, 2021
dcbfa22
arch: remove spurious blkdev.h includes
Sep 20, 2021
545c664
kernel: remove spurious blkdev.h includes
Sep 20, 2021
6a5850d
sched: move the <linux/blkdev.h> include out of kernel/sched/sched.h
Sep 20, 2021
1d9433c
block: remove the unused rq_end_sector macro
Sep 20, 2021
9013823
block: remove the unused blk_queue_state enum
Sep 20, 2021
713e4e1
block: remove the cmd_size field from struct request_queue
Sep 20, 2021
9778ac7
block: remove the struct blk_queue_ctx forward declaration
Sep 20, 2021
2e9bc34
block: move elevator.h to block/
Sep 20, 2021
3ab0bc7
block: drop unused includes in <linux/blkdev.h>
Sep 20, 2021
b81e0c2
block: drop unused includes in <linux/genhd.h>
Sep 20, 2021
badf7f6
block: move a few merge helpers out of <linux/blkdev.h>
Sep 20, 2021
fe45e63
block: move integrity handling out of <linux/blkdev.h>
Sep 20, 2021
24b83de
block: move struct request to blk-mq.h
Sep 20, 2021
e2c7275
block/mq-deadline: Improve request accounting further
bvanassche Sep 27, 2021
32f64ca
block/mq-deadline: Add an invariant check
bvanassche Sep 27, 2021
bce0363
block/mq-deadline: Stop using per-CPU counters
bvanassche Sep 27, 2021
322cff7
block/mq-deadline: Prioritize high-priority requests
bvanassche Sep 27, 2021
8a3ee67
block: print the current process in handle_bad_sector
Sep 28, 2021
65de57b
blk-mq: Change rqs check in blk_mq_free_rqs()
Oct 5, 2021
d2a2796
block: Rename BLKDEV_MAX_RQ -> BLKDEV_DEFAULT_RQ
Oct 5, 2021
8fa0446
blk-mq: Relocate shared sbitmap resize in blk_mq_update_nr_requests()
Oct 5, 2021
f6adcef
blk-mq: Invert check in blk_mq_update_nr_requests()
Oct 5, 2021
d99a6bb
blk-mq-sched: Rename blk_mq_sched_alloc_{tags -> map_and_rqs}()
Oct 5, 2021
1820f4f
blk-mq-sched: Rename blk_mq_sched_free_{requests -> rqs}()
Oct 5, 2021
f32e4ea
blk-mq: Pass driver tags to blk_mq_clear_rq_mapping()
Oct 5, 2021
4f245d5
blk-mq: Don't clear driver tags own mapping
Oct 5, 2021
a7e7388
blk-mq: Add blk_mq_tag_update_sched_shared_sbitmap()
Oct 5, 2021
63064be
blk-mq: Add blk_mq_alloc_map_and_rqs()
Oct 5, 2021
645db34
blk-mq: Refactor and rename blk_mq_free_map_and_{requests->rqs}()
Oct 5, 2021
e155b0c
blk-mq: Use shared tags for shared sbitmap support
Oct 5, 2021
ae0f1a7
blk-mq: Stop using pointers for blk_mq_tags bitmap tags
Oct 5, 2021
079a2e3
blk-mq: Change shared sbitmap naming to shared tags
Oct 5, 2021
a7b36ee
block: move blk-throtl fast path inline
axboe Oct 5, 2021
0006707
block: inherit request start time from bio for BLK_CGROUP
axboe Oct 5, 2021
ba0ffdd
block: bump max plugged deferred size from 16 to 32
axboe Oct 6, 2021
47c122e
block: pre-allocate requests if plug is started and is a batch
axboe Oct 6, 2021
b90cfae
blk-mq: cleanup and rename __blk_mq_alloc_request
Oct 12, 2021
0f38d76
blk-mq: cleanup blk_mq_submit_bio
Oct 12, 2021
4a60f36
block: don't dereference request after flush insertion
axboe Oct 16, 2021
fea349b
block: unexport blkdev_ioctl
Oct 12, 2021
84b8514
block: move the *blkdev_ioctl declarations out of blkdev.h
Oct 12, 2021
8a70951
block: merge block_ioctl into blkdev_ioctl
Oct 12, 2021
be6bfe3
block: inline hot paths of blk_account_io_*()
isilence Oct 9, 2021
e9ea159
blk-mq: inline hot part of __blk_mq_sched_restart
isilence Oct 9, 2021
9e8c0d0
block: remove BIO_BUG_ON
Oct 12, 2021
11d9cab
block: don't include <linux/ioprio.h> in <linux/bio.h>
Oct 12, 2021
8addffd
block: move bio_mergeable out of bio.h
Oct 12, 2021
b6559d8
block: fold bio_cur_bytes into blk_rq_cur_bytes
Oct 12, 2021
9a6083b
block: move bio_full out of bio.h
Oct 12, 2021
9774b39
block: mark __bio_try_merge_page static
Oct 12, 2021
ff18d77
block: move bio_get_{first,last}_bvec out of bio.h
Oct 12, 2021
4f7ab09
block: mark bio_truncate static
Oct 12, 2021
8971a3b
blk-mq: optimise *end_request non-stat path
isilence Oct 13, 2021
9672b0d
sbitmap: add __sbitmap_queue_get_batch()
axboe Oct 9, 2021
349302d
block: improve batched tag allocation
axboe Oct 9, 2021
df252bd
block: remove redundant =y from BLK_CGROUP dependency
masahir0y Sep 27, 2021
c50fca5
block: simplify Kconfig files
masahir0y Sep 27, 2021
b8b98a6
block: move menu "Partition type" to block/partitions/Kconfig
masahir0y Sep 27, 2021
4c92890
block: move CONFIG_BLOCK guard to top Makefile
masahir0y Sep 27, 2021
d38a9c0
block: only check previous entry for plug merge attempt
axboe Oct 14, 2021
94c2ed5
direct-io: remove blk_poll support
Oct 12, 2021
71fc3f5
block: don't try to poll multi-bio I/Os in __blkdev_direct_IO
Oct 12, 2021
f79d474
iomap: don't try to poll multi-bio I/Os in __iomap_dio_rw
Oct 12, 2021
30da1b4
io_uring: fix a layering violation in io_iopoll_req_issued
Oct 12, 2021
f70299f
blk-mq: factor out a blk_qc_to_hctx helper
Oct 12, 2021
c6699d6
blk-mq: factor out a "classic" poll helper
Oct 12, 2021
efbabbe
blk-mq: remove blk_qc_t_to_tag and blk_qc_t_is_internal
Oct 12, 2021
28a1ae6
blk-mq: remove blk_qc_t_valid
Oct 12, 2021
ef99b2d
block: replace the spin argument to blk_iopoll with a flags argument
Oct 12, 2021
d729cf9
io_uring: don't sleep when polling for I/O
Oct 12, 2021
6ce913f
block: rename REQ_HIPRI to REQ_POLLED
Oct 12, 2021
1a7e76e
block: use SLAB_TYPESAFE_BY_RCU for the bio slab
Oct 12, 2021
1941612
block: define 'struct bvec_iter' as packed
Oct 12, 2021
3e08773
block: switch polling to be bio based
Oct 12, 2021
a614dd2
block: don't allow writing to the poll queue attribute
Oct 12, 2021
c712dcc
nvme-multipath: enable polled I/O
Oct 12, 2021
fac7c6d
block: cache bdev in struct file for raw bdev IO
isilence Oct 13, 2021
09ce874
block: use flags instead of bit fields for blkdev_dio
axboe Oct 14, 2021
abd45c1
block: handle fast path of bio splitting inline
axboe Oct 13, 2021
17220ca
block: cache request queue in bdev
isilence Oct 14, 2021
025a386
block: use bdev_get_queue() in bdev.c
isilence Oct 14, 2021
3caee46
block: use bdev_get_queue() in bio.c
isilence Oct 14, 2021
eab4e02
block: use bdev_get_queue() in blk-core.c
isilence Oct 14, 2021
ed6cdde
block: convert the rest of block to bdev_get_queue
isilence Oct 14, 2021
d4aa57a
block: don't bother iter advancing a fully done bio
axboe Oct 13, 2021
c477b79
block: remove useless caller argument to print_req_error()
axboe Oct 14, 2021
9be3e06
block: move update request helpers into blk-mq.c
axboe Oct 14, 2021
b608762
block: improve layout of struct request
axboe Oct 15, 2021
90b8faa
block: only mark bio as tracked if it really is tracked
axboe Oct 16, 2021
2ff0682
block: store elevator state in request
axboe Oct 15, 2021
4f266f2
block: skip elevator fields init for non-elv queue
isilence Oct 18, 2021
605f784
block: blk_mq_rq_ctx_init cache ctx/q/hctx
isilence Oct 18, 2021
1284590
block: cache rq_flags inside blk_mq_rq_ctx_init()
isilence Oct 18, 2021
9a14d6c
block: remove debugfs blk_mq_ctx dispatched/merged/completed attributes
axboe Oct 16, 2021
afd7de0
block: remove some blk_mq_hw_ctx debugfs entries
axboe Oct 18, 2021
013a7f9
block: provide helpers for rq_list manipulation
axboe Oct 13, 2021
5a72e89
block: add a struct io_comp_batch argument to fops->iopoll()
axboe Oct 12, 2021
1aec5e4
sbitmap: add helper to clear a batch of tags
axboe Oct 8, 2021
f794f33
block: add support for blk_mq_end_request_batch()
axboe Oct 8, 2021
c234a65
nvme: add support for batched completion of polled IO
axboe Oct 8, 2021
b688f11
io_uring: utilize the io batching infrastructure for more efficient p…
axboe Oct 12, 2021
4f50224
nvme: wire up completion batching for the IRQ path
axboe Oct 18, 2021
e0d78af
block: fix too broad elevator check in blk_mq_free_request()
axboe Oct 19, 2021
a87acfd
io_uring: dump sqe contents if issue fails
axboe Sep 11, 2021
71e1cef
io-wq: Remove duplicate code in io_workqueue_create()
Sep 11, 2021
4b628ae
io_uring: kill off ios_left
isilence Sep 8, 2021
6b63952
io_uring: inline io_dismantle_req
isilence Sep 8, 2021
d81499b
io_uring: inline linked part of io_req_find_next
isilence Sep 8, 2021
c450178
io_uring: dedup CQE flushing non-empty checks
isilence Sep 8, 2021
d97ec62
io_uring: kill extra wake_up_process in tw add
isilence Sep 8, 2021
83f8435
io_uring: add more uring info to fdinfo for debug
Sep 13, 2021
a3f3490
io_uring: remove ctx referencing from complete_post
isilence Sep 15, 2021
68fe256
io_uring: optimise io_req_init() sqe flags checks
isilence Sep 15, 2021
8d4af68
io_uring: return boolean value for io_alloc_async_data
Sep 22, 2021
6878b40
io_uring: mark having different creds unlikely
isilence Sep 24, 2021
87a115f
io_uring: force_nonspin
isilence Sep 24, 2021
5ba3c87
io_uring: make io_do_iopoll return number of reqs
isilence Sep 24, 2021
6f33b0b
io_uring: use slist for completion batching
isilence Sep 24, 2021
3ab665b
io_uring: remove allocation cache array
isilence Sep 24, 2021
0d9521b
io-wq: add io_wq_work_node based stack
isilence Sep 24, 2021
c2b6c6b
io_uring: replace list with stack for req caches
isilence Sep 24, 2021
e3f721e
io_uring: split iopoll loop
isilence Sep 24, 2021
5eef4e8
io_uring: use single linked list for iopoll
isilence Sep 24, 2021
3aa83bf
io_uring: add a helper for batch free
isilence Sep 24, 2021
b3fa03f
io_uring: convert iopoll_completed to store_release
isilence Sep 24, 2021
f5ed3bc
io_uring: optimise batch completion
isilence Sep 24, 2021
d4b7a5e
io_uring: inline completion batching helpers
isilence Sep 24, 2021
1cce17a
io_uring: don't pass tail into io_free_batch_list
isilence Sep 24, 2021
553deff
io_uring: don't pass state to io_submit_state_end
isilence Sep 24, 2021
f15a343
io_uring: deduplicate io_queue_sqe() call sites
isilence Sep 24, 2021
2a56a9b
io_uring: remove drain_active check from hot path
isilence Sep 24, 2021
4652fe3
io_uring: split slow path from io_queue_sqe
isilence Sep 24, 2021
d475a9a
io_uring: inline hot path of __io_queue_sqe()
isilence Sep 24, 2021
d9f9d28
io_uring: reshuffle queue_sqe completion handling
isilence Sep 24, 2021
6962980
io_uring: restructure submit sqes to_submit checks
isilence Sep 24, 2021
ef05d9e
io_uring: kill off ->inflight_entry field
isilence Sep 24, 2021
a1cdbb4
io_uring: comment why inline complete calls io_clean_op()
isilence Sep 24, 2021
5e37126
io_uring: disable draining earlier
isilence Sep 24, 2021
22b2ca3
io_uring: extra a helper for drain init
isilence Oct 1, 2021
e0eb71d
io_uring: don't return from io_drain_req()
isilence Oct 1, 2021
fc0ae02
io_uring: init opcode in io_init_req()
isilence Oct 1, 2021
30d51dd
io_uring: clean up buffer select
isilence Oct 1, 2021
6224590
io_uring: add flag to not fail link after timeout
isilence Oct 2, 2021
7e3709d
io_uring: optimise kiocb layout
isilence Oct 4, 2021
51d48da
io_uring: add more likely/unlikely() annotations
isilence Oct 4, 2021
fff4e40
io_uring: delay req queueing into compl-batch list
isilence Oct 4, 2021
a33ae9c
io_uring: optimise request allocation
isilence Oct 4, 2021
765ff49
io_uring: optimise INIT_WQ_LIST
isilence Oct 4, 2021
aede728
io_uring: don't wake sqpoll in io_cqring_ev_posted
isilence Oct 4, 2021
d60aa65
io_uring: merge CQ and poll waitqueues
isilence Oct 4, 2021
37f0e76
io_uring: optimise ctx referencing by requests
isilence Oct 4, 2021
c072481
io_uring: mark cold functions
isilence Oct 4, 2021
c1e53a6
io_uring: optimise io_free_batch_list()
isilence Oct 4, 2021
d886e18
io_uring: control ->async_data with a REQ_F flag
isilence Oct 4, 2021
d17e56e
io_uring: remove struct io_completion
isilence Oct 4, 2021
867f8fa
io_uring: inline io_req_needs_clean()
isilence Oct 4, 2021
eb6e6f0
io_uring: inline io_poll_complete
isilence Oct 4, 2021
54daa9b
io_uring: correct fill events helpers types
isilence Oct 4, 2021
6d63416
io_uring: optimise plugging
isilence Oct 6, 2021
756ab7c
io_uring: safer fallback_work free
isilence Oct 6, 2021
5a158c6
io_uring: reshuffle io_submit_state bits
isilence Oct 6, 2021
4a04d1d
io_uring: optimise out req->opcode reloading
isilence Oct 6, 2021
0cd3e3d
io_uring: remove extra io_ring_exit_work wake up
isilence Oct 6, 2021
def77ac
io_uring: fix io_free_batch_list races
isilence Oct 12, 2021
a46be97
io_uring: optimise io_req_set_rsrc_node()
isilence Oct 9, 2021
ab40940
io_uring: optimise rsrc referencing
isilence Oct 9, 2021
04f3408
io_uring: consistent typing for issue_flags
isilence Oct 14, 2021
f80a50a
io_uring: prioritise read success path over fails
isilence Oct 14, 2021
258f3a7
io_uring: optimise rw comletion handlers
isilence Oct 14, 2021
538941e
io_uring: encapsulate rw state
isilence Oct 14, 2021
c88598a
io_uring: optimise read/write iov state storing
isilence Oct 14, 2021
51aac42
io_uring: optimise io_import_iovec nonblock passing
isilence Oct 14, 2021
5e49c97
io_uring: clean up io_import_iovec
isilence Oct 14, 2021
607b6fb
io_uring: rearrange io_read()/write()
isilence Oct 14, 2021
9983028
io_uring: optimise req->ctx reloads
isilence Oct 15, 2021
9882131
io_uring: kill io_wq_current_is_worker() in iopoll
isilence Oct 15, 2021
d1d681b
io_uring: optimise io_import_iovec fixed path
isilence Oct 15, 2021
caa8fe6
io_uring: return iovec from __io_import_iovec
isilence Oct 15, 2021
578c0ee
io_uring: optimise fixed rw rsrc node setting
isilence Oct 15, 2021
5cb03d6
io_uring: clean io_prep_rw()
isilence Oct 15, 2021
b10841c
fs/io_uring: Prioritise checking faster conditions first in io_write
goldsteinn Oct 17, 2021
e74ead1
io_uring: arm poll for non-nowait files
isilence Oct 16, 2021
35645ac
io_uring: combine REQ_F_NOWAIT_{READ,WRITE} flags
isilence Oct 16, 2021
88459b5
io_uring: simplify io_file_supports_nowait()
isilence Oct 16, 2021
5ca7a8b
io_uring: inform block layer of how many requests we are submitting
axboe Oct 6, 2021
0016924
io_uring: warning about unused-but-set parameter
arndb Oct 19, 2021
3b44b37
io_uring: split logic of force_nonblock
Oct 18, 2021
898df24
io_uring: Use ERR_CAST() instead of ERR_PTR(PTR_ERR())
Oct 20, 2021
90fa028
io_uring: implement async hybrid mode for pollable requests
Oct 18, 2021
c907e52
io-wq: use helper for worker refcounting
isilence Oct 23, 2021
255657d
io_uring: clean io_wq_submit_work()'s main loop
isilence Oct 23, 2021
d01905d
io_uring: clean iowq submit work cancellation
isilence Oct 23, 2021
658d0a4
io_uring: check if opcode needs poll first on arming
isilence Oct 23, 2021
afb7f56
io_uring: don't try io-wq polling if not supported
isilence Oct 23, 2021
d6a644a
io_uring: clean up timeout async_data allocation
isilence Oct 23, 2021
b9a6b8f
io_uring: kill unused param from io_file_supports_nowait
isilence Oct 23, 2021
fb27274
io_uring: clusterise ki_flags access in rw_prep
isilence Oct 23, 2021
3884b83
io_uring: don't assign write hint in the read path
axboe Oct 25, 2021
f75d118
io_uring: harder fdinfo sq/cq ring iterating
axboe Oct 29, 2021
1d5f5ea
io-wq: remove worker to owner tw dependency
isilence Oct 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,8 @@ export MODORDER := $(extmod_prefix)modules.order
export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps

ifeq ($(KBUILD_EXTMOD),)
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/
core-$(CONFIG_BLOCK) += block/

vmlinux-dirs := $(patsubst %/,%,$(filter %/, \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
Expand Down
3 changes: 1 addition & 2 deletions arch/m68k/emu/nfblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct nfhd_device {
struct gendisk *disk;
};

static blk_qc_t nfhd_submit_bio(struct bio *bio)
static void nfhd_submit_bio(struct bio *bio)
{
struct nfhd_device *dev = bio->bi_bdev->bd_disk->private_data;
struct bio_vec bvec;
Expand All @@ -76,7 +76,6 @@ static blk_qc_t nfhd_submit_bio(struct bio *bio)
sec += len;
}
bio_endio(bio);
return BLK_QC_T_NONE;
}

static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
Expand Down
1 change: 0 additions & 1 deletion arch/mips/rb532/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/console.h>
#include <linux/memblock.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>

#include <asm/bootinfo.h>
#include <asm/mach-rc32434/ddr.h>
Expand Down
1 change: 0 additions & 1 deletion arch/mips/sibyte/common/cfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <linux/kernel.h>
#include <linux/linkage.h>
#include <linux/mm.h>
#include <linux/blkdev.h>
#include <linux/memblock.h>
#include <linux/pm.h>
#include <linux/smp.h>
Expand Down
1 change: 0 additions & 1 deletion arch/mips/sibyte/swarm/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <linux/spinlock.h>
#include <linux/mm.h>
#include <linux/memblock.h>
#include <linux/blkdev.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/screen_info.h>
Expand Down
1 change: 0 additions & 1 deletion arch/openrisc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/memblock.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/blkdev.h> /* for initrd_* */
#include <linux/pagemap.h>

#include <asm/pgalloc.h>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/namei.h>
#include <linux/pagemap.h>
#include <linux/poll.h>
#include <linux/seq_file.h>
#include <linux/slab.h>

#include <asm/prom.h>
Expand Down
1 change: 1 addition & 0 deletions arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/blk-mq.h>
#include <linux/ata.h>
#include <linux/hdreg.h>
#include <linux/major.h>
#include <linux/cdrom.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
Expand Down
3 changes: 1 addition & 2 deletions arch/xtensa/platforms/iss/simdisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void simdisk_transfer(struct simdisk *dev, unsigned long sector,
spin_unlock(&dev->lock);
}

static blk_qc_t simdisk_submit_bio(struct bio *bio)
static void simdisk_submit_bio(struct bio *bio)
{
struct simdisk *dev = bio->bi_bdev->bd_disk->private_data;
struct bio_vec bvec;
Expand All @@ -118,7 +118,6 @@ static blk_qc_t simdisk_submit_bio(struct bio *bio)
}

bio_endio(bio);
return BLK_QC_T_NONE;
}

static int simdisk_open(struct block_device *bdev, fmode_t mode)
Expand Down
28 changes: 10 additions & 18 deletions block/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ config BLK_DEV_ZONED

config BLK_DEV_THROTTLING
bool "Block layer bio throttling support"
depends on BLK_CGROUP=y
depends on BLK_CGROUP
select BLK_CGROUP_RWSTAT
help
Block layer bio throttling support. It can be used to limit
Expand Down Expand Up @@ -112,7 +112,7 @@ config BLK_WBT_MQ

config BLK_CGROUP_IOLATENCY
bool "Enable support for latency based cgroup IO protection"
depends on BLK_CGROUP=y
depends on BLK_CGROUP
help
Enabling this option enables the .latency interface for IO throttling.
The IO controller will attempt to maintain average IO latencies below
Expand All @@ -132,7 +132,7 @@ config BLK_CGROUP_FC_APPID

config BLK_CGROUP_IOCOST
bool "Enable support for cost model based cgroup IO controller"
depends on BLK_CGROUP=y
depends on BLK_CGROUP
select BLK_RQ_IO_DATA_LEN
select BLK_RQ_ALLOC_TIME
help
Expand Down Expand Up @@ -190,39 +190,31 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
by falling back to the kernel crypto API when inline
encryption hardware is not present.

menu "Partition Types"

source "block/partitions/Kconfig"

endmenu

endif # BLOCK

config BLOCK_COMPAT
bool
depends on BLOCK && COMPAT
default y
def_bool COMPAT

config BLK_MQ_PCI
bool
depends on BLOCK && PCI
default y
def_bool PCI

config BLK_MQ_VIRTIO
bool
depends on BLOCK && VIRTIO
depends on VIRTIO
default y

config BLK_MQ_RDMA
bool
depends on BLOCK && INFINIBAND
depends on INFINIBAND
default y

config BLK_PM
def_bool BLOCK && PM
def_bool PM

# do not use in new code
config BLOCK_HOLDER_DEPRECATED
bool

source "block/Kconfig.iosched"

endif # BLOCK
4 changes: 0 additions & 4 deletions block/Kconfig.iosched
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
if BLOCK

menu "IO Schedulers"

config MQ_IOSCHED_DEADLINE
Expand Down Expand Up @@ -45,5 +43,3 @@ config BFQ_CGROUP_DEBUG
files in a cgroup which can be useful for debugging.

endmenu

endif
2 changes: 1 addition & 1 deletion block/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Makefile for the kernel block layer
#

obj-$(CONFIG_BLOCK) := bdev.o fops.o bio.o elevator.o blk-core.o blk-sysfs.o \
obj-y := bdev.o fops.o bio.o elevator.o blk-core.o blk-sysfs.o \
blk-flush.o blk-settings.o blk-ioc.o blk-map.o \
blk-exec.o blk-merge.o blk-timeout.o \
blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
Expand Down
10 changes: 6 additions & 4 deletions block/bdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/major.h>
#include <linux/device_cgroup.h>
#include <linux/blkdev.h>
#include <linux/blk-integrity.h>
#include <linux/backing-dev.h>
#include <linux/module.h>
#include <linux/blkpg.h>
Expand Down Expand Up @@ -326,12 +327,12 @@ int bdev_read_page(struct block_device *bdev, sector_t sector,
if (!ops->rw_page || bdev_get_integrity(bdev))
return result;

result = blk_queue_enter(bdev->bd_disk->queue, 0);
result = blk_queue_enter(bdev_get_queue(bdev), 0);
if (result)
return result;
result = ops->rw_page(bdev, sector + get_start_sect(bdev), page,
REQ_OP_READ);
blk_queue_exit(bdev->bd_disk->queue);
blk_queue_exit(bdev_get_queue(bdev));
return result;
}

Expand Down Expand Up @@ -362,7 +363,7 @@ int bdev_write_page(struct block_device *bdev, sector_t sector,

if (!ops->rw_page || bdev_get_integrity(bdev))
return -EOPNOTSUPP;
result = blk_queue_enter(bdev->bd_disk->queue, 0);
result = blk_queue_enter(bdev_get_queue(bdev), 0);
if (result)
return result;

Expand All @@ -375,7 +376,7 @@ int bdev_write_page(struct block_device *bdev, sector_t sector,
clean_page_buffers(page);
unlock_page(page);
}
blk_queue_exit(bdev->bd_disk->queue);
blk_queue_exit(bdev_get_queue(bdev));
return result;
}

Expand Down Expand Up @@ -492,6 +493,7 @@ struct block_device *bdev_alloc(struct gendisk *disk, u8 partno)
spin_lock_init(&bdev->bd_size_lock);
bdev->bd_partno = partno;
bdev->bd_inode = inode;
bdev->bd_queue = disk->queue;
bdev->bd_stats = alloc_percpu(struct disk_stats);
if (!bdev->bd_stats) {
iput(inode);
Expand Down
2 changes: 1 addition & 1 deletion block/bfq-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/cgroup.h>
#include <linux/elevator.h>
#include <linux/ktime.h>
#include <linux/rbtree.h>
#include <linux/ioprio.h>
#include <linux/sbitmap.h>
#include <linux/delay.h>

#include "elevator.h"
#include "bfq-iosched.h"

#ifdef CONFIG_BFQ_CGROUP_DEBUG
Expand Down
6 changes: 3 additions & 3 deletions block/bfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/cgroup.h>
#include <linux/elevator.h>
#include <linux/ktime.h>
#include <linux/rbtree.h>
#include <linux/ioprio.h>
Expand All @@ -127,6 +126,7 @@

#include <trace/events/block.h>

#include "elevator.h"
#include "blk.h"
#include "blk-mq.h"
#include "blk-mq-tag.h"
Expand Down Expand Up @@ -6884,8 +6884,8 @@ static void bfq_depth_updated(struct blk_mq_hw_ctx *hctx)
struct blk_mq_tags *tags = hctx->sched_tags;
unsigned int min_shallow;

min_shallow = bfq_update_depths(bfqd, tags->bitmap_tags);
sbitmap_queue_min_shallow_depth(tags->bitmap_tags, min_shallow);
min_shallow = bfq_update_depths(bfqd, &tags->bitmap_tags);
sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, min_shallow);
}

static int bfq_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int index)
Expand Down
4 changes: 2 additions & 2 deletions block/bio-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Written by: Martin K. Petersen <[email protected]>
*/

#include <linux/blkdev.h>
#include <linux/blk-integrity.h>
#include <linux/mempool.h>
#include <linux/export.h>
#include <linux/bio.h>
Expand Down Expand Up @@ -134,7 +134,7 @@ int bio_integrity_add_page(struct bio *bio, struct page *page,
iv = bip->bip_vec + bip->bip_vcnt;

if (bip->bip_vcnt &&
bvec_gap_to_prev(bio->bi_bdev->bd_disk->queue,
bvec_gap_to_prev(bdev_get_queue(bio->bi_bdev),
&bip->bip_vec[bip->bip_vcnt - 1], offset))
return 0;

Expand Down
Loading