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] Block driver updates for 5.16-rc1 #13

Merged
merged 226 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
226 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
0a593fb
null_blk: poll queue support
axboe Apr 17, 2021
905705f
loop: add error handling support for add_disk()
mcgrof Sep 27, 2021
e1654f4
nbd: add error handling support for add_disk()
mcgrof Sep 27, 2021
d9c2bd2
aoe: add error handling support for add_disk()
mcgrof Sep 27, 2021
e92ab4e
drbd: add error handling support for add_disk()
mcgrof Sep 27, 2021
d1df602
n64cart: add error handling support for add_disk()
mcgrof Sep 27, 2021
7d8b72a
pcd: move the identify buffer into pcd_identify
Sep 27, 2021
af761f2
pcd: cleanup initialization
Sep 27, 2021
fb367e6
pf: cleanup initialization
Sep 27, 2021
1ad392a
pd: cleanup initialization
Sep 27, 2021
4dfbd13
pcd: add error handling support for add_disk()
mcgrof Sep 27, 2021
2b6cabc
pcd: fix ordering of unregister_cdrom()
mcgrof Sep 27, 2021
b6fa069
pcd: capture errors on cdrom_register()
mcgrof Sep 27, 2021
3dfdd5f
pd: add error handling support for add_disk()
mcgrof Sep 27, 2021
4a32e1c
mtip32xx: add error handling support for add_disk()
mcgrof Sep 27, 2021
7b50562
pktcdvd: add error handling support for add_disk()
mcgrof Sep 27, 2021
54494d1
block/rsxx: add error handling support for add_disk()
mcgrof Sep 27, 2021
637208e
block/sx8: add error handling support for add_disk()
mcgrof Sep 27, 2021
4fac63f
pf: add error handling support for add_disk()
mcgrof Sep 27, 2021
d6ac27c
cdrom/gdrom: add error handling support for add_disk()
mcgrof Sep 27, 2021
27c97ab
rbd: add add_disk() error handling
mcgrof Sep 27, 2021
2d4bcf7
block/swim3: add error handling support for add_disk()
mcgrof Sep 27, 2021
2598a2b
floppy: fix add_disk() assumption on exit due to new developments
mcgrof Sep 27, 2021
3776339
floppy: use blk_cleanup_disk()
mcgrof Sep 27, 2021
662167e
floppy: fix calling platform_device_unregister() on invalid drives
mcgrof Sep 27, 2021
47d34aa
floppy: add error handling support for add_disk()
mcgrof Sep 27, 2021
a237942
amiflop: add error handling support for add_disk()
mcgrof Sep 27, 2021
b76a30c
swim: simplify using blk_cleanup_disk() on swim_remove()
mcgrof Sep 27, 2021
4e9abe7
swim: add helper for disk cleanup
mcgrof Sep 27, 2021
9ef41ef
swim: add a floppy registration bool which triggers del_gendisk()
mcgrof Sep 27, 2021
625a28a
swim: add error handling support for add_disk()
mcgrof Sep 27, 2021
44a469b
block/ataflop: use the blk_cleanup_disk() helper
mcgrof Sep 27, 2021
573effb
block/ataflop: add registration bool before calling del_gendisk()
mcgrof Sep 27, 2021
deae113
block/ataflop: provide a helper for cleanup up an atari disk
mcgrof Sep 27, 2021
2f15107
block/ataflop: add error handling support for add_disk()
mcgrof Sep 27, 2021
db8eda9
xtensa/platforms/iss/simdisk: add error handling support for add_disk()
mcgrof Sep 27, 2021
d0ac7a3
pcd: fix error codes in pcd_init_unit()
Oct 1, 2021
cfc03ea
pf: fix error codes in pf_init_unit()
Oct 1, 2021
5deae20
sx8: fix an error code in carm_init_one()
Oct 1, 2021
1f0a258
swim3: add missing major.h include
axboe Oct 2, 2021
9be68dd
md: add error handling support for add_disk()
mcgrof Sep 1, 2021
51238e7
md: add the bitmap group to the default groups for the md kobject
Sep 1, 2021
94f3cd7
md: extend disks_mutex coverage
Sep 1, 2021
7ad1069
md: properly unwind when failing to add the kobject in md_alloc
Sep 1, 2021
fd3b697
md/raid1: only allocate write behind bio for WriteMostly device
Oct 4, 2021
2e94275
md/raid1: use rdev in raid1_write_request directly
Oct 4, 2021
c6efe43
md/raid5: call roundup_pow_of_two in raid5_run
Oct 4, 2021
5467948
md: remove unused argument from md_new_event
Oct 4, 2021
8b9e229
md: update superblock after changing rdev flags in state_store
XiaoNi87 Oct 13, 2021
c573d58
mtip32xx: Remove redundant 'flush_workqueue()' calls
tititiou36 Oct 14, 2021
4e6eef5
nbd: don't handle response without a corresponding request message
Sep 16, 2021
07175cb
nbd: make sure request completion won't concurrent
Sep 16, 2021
fcf3d63
nbd: check sock index in nbd_read_stat()
Sep 16, 2021
0de2b7a
nbd: don't start request if nbd_queue_rq() failed
Sep 16, 2021
f52c0e0
nbd: clean up return value checking of sock_xmit()
Sep 16, 2021
3fe1db6
nbd: partition nbd_read_stat() into nbd_read_reply() and nbd_handle_r…
Sep 16, 2021
8663b21
nbd: fix uaf in nbd_handle_reply()
Sep 16, 2021
86d46fd
block: ataflop: fix breakage introduced at blk-mq refactoring
Oct 19, 2021
9c3d292
nvme: move command clear into the various setup helpers
axboe Oct 18, 2021
a9a7e30
nvme: don't memset() the normal read/write command
axboe Oct 18, 2021
0c98057
nbd: Fix use-after-free in pid_show
Oct 20, 2021
169bbda
s390/dasd: handle request magic consistently as unsigned int
hcahca Oct 20, 2021
10c78e5
s390/dasd: fix kernel doc comment
hcahca Oct 20, 2021
2359696
s390/dasd: split up dasd_eckd_read_conf
Oct 20, 2021
74e2f21
s390/dasd: move dasd_eckd_read_fc_security
Oct 20, 2021
542e30c
s390/dasd: summarize dasd configuration data in a separate structure
Oct 20, 2021
9dffede
s390/dasd: fix missing path conf_data after failed allocation
Oct 20, 2021
a8e5d49
s390/dasd: fix possibly missed path verification
Oct 20, 2021
a307e2a
md: bcache: Fix spelling of 'acquire'
Oct 20, 2021
0a2b3e3
bcache: reserve never used bits from bkey.high
Oct 20, 2021
d55f7cb
bcache: fix error info in register_bcache()
chaseyu Oct 20, 2021
0259d44
bcache: move calc_cached_dev_sectors to proper place on backing devic…
linfeng2999 Oct 20, 2021
7e84c21
bcache: remove the cache_dev_name field from struct cache
Oct 20, 2021
0f5cd78
bcache: remove the backing_dev_name field from struct cached_dev
Oct 20, 2021
00387bd
bcache: use bvec_kmap_local in bch_data_verify
Oct 20, 2021
39fa7a9
bcache: remove bch_crc64_update
Oct 20, 2021
f6f09c1
nvme: generate uevent once a multipath namespace is operational again
hreinecke Oct 6, 2021
01d8381
nvme-fc: add support for ->map_queues
Aug 23, 2021
2b2af50
qla2xxx: add ->map_queues support for nvme
Aug 23, 2021
e3e19dc
nvmet: fix use-after-free when a port is removed
israelru Oct 6, 2021
fcf73a8
nvmet-rdma: fix use-after-free when a port is removed
israelru Oct 6, 2021
2351ead
nvmet-tcp: fix use-after-free when a port is removed
israelru Oct 6, 2021
44c3c62
nvme-rdma: limit the maximal queue size for RDMA controllers
mgurtovoy Sep 22, 2021
6d1555c
nvmet: add get_max_queue_size op for controllers
mgurtovoy Sep 22, 2021
c7d792f
nvmet-rdma: implement get_max_queue_size controller op
mgurtovoy Sep 22, 2021
626851e
nvmet: make discovery NQN configurable
hreinecke Sep 22, 2021
e15a8a9
nvme: add CNTRLTYPE definitions for 'identify controller'
hreinecke Sep 22, 2021
a294711
nvmet: add nvmet_is_disc_subsys() helper
hreinecke Sep 22, 2021
d3aef70
nvmet: set 'CNTRLTYPE' in the identify controller data
hreinecke Sep 22, 2021
954ae16
nvme: expose subsystem type in sysfs attribute 'subsystype'
hreinecke Sep 22, 2021
20e8b68
nvme: Add connect option 'discovery'
hreinecke Sep 22, 2021
e5ea42f
nvme: display correct subsystem NQN
hreinecke Sep 22, 2021
571b544
nvmet: use macro definition for setting nmic value
mgurtovoy Sep 23, 2021
d56ae18
nvmet: use macro definitions for setting cmic value
mgurtovoy Sep 23, 2021
1138458
nvme-multipath: add error handling support for add_disk()
mcgrof Oct 15, 2021
0974812
nvme-rdma: fix error code in nvme_rdma_setup_ctrl
mgurtovoy Oct 17, 2021
58847f1
nvme-pci: clear shadow doorbell memory on resets
keithbusch Oct 14, 2021
2b81a5f
nvme: drop scan_lock and always kick requeue list when removing names…
hreinecke Oct 20, 2021
117d5b6
nvmet: use struct_size over open coded arithmetic
Oct 17, 2021
cbab6ae
Merge tag 'nvme-5.16-2021-10-21' of git://git.infradead.org/nvme into…
axboe Oct 21, 2021
ff06ed7
block: aoe: fixup coccinelle warnings
Oct 21, 2021
e7089f6
dm: add add_disk() error handling
mcgrof Oct 15, 2021
2961c3b
bcache: add error handling support for add_disk()
mcgrof Oct 15, 2021
293a7c5
xen-blkfront: add error handling support for add_disk()
mcgrof Oct 15, 2021
21fd880
m68k/emu/nfblock: add error handling support for add_disk()
mcgrof Oct 15, 2021
66638f1
um/drivers/ubd_kern: add error handling support for add_disk()
mcgrof Oct 15, 2021
2e9e31b
rnbd: add error handling support for add_disk()
mcgrof Oct 15, 2021
83b863f
mtd: add add_disk() error handling
mcgrof Oct 15, 2021
47e9624
block: remove support for cryptoloop and the xor transfer
Oct 19, 2021
d28e4df
block: ataflop: more blk-mq refactoring fixes
Oct 24, 2021
785d584
nvme: add new discovery log page entry definitions
hreinecke Oct 18, 2021
598e759
nvmet: switch check for subsystem type
hreinecke Oct 18, 2021
2953b30
nvmet: register discovery subsystem as 'current'
hreinecke Oct 18, 2021
d156cfc
nvmet: use flex_array_size and struct_size
Oct 24, 2021
ca77879
Merge tag 'nvme-5.16-2021-10-28' of git://git.infradead.org/nvme into…
axboe Oct 28, 2021
cf2197c
bcache: move uapi header bcache.h to bcache code directory
Oct 29, 2021
1b86db5
bcache: replace snprintf in show functions with sysfs_emit
Oct 29, 2021
df75db1
block: ataflop: Fix warning comparing pointer to 0
Oct 29, 2021
15dfc66
null_blk: Fix handling of submit_queues and poll_queues attributes
kawasaki 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
12 changes: 8 additions & 4 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 All @@ -100,6 +99,7 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
{
struct nfhd_device *dev;
int dev_id = id - NFHD_DEV_OFFSET;
int err = -ENOMEM;

pr_info("nfhd%u: found device with %u blocks (%u bytes)\n", dev_id,
blocks, bsize);
Expand Down Expand Up @@ -130,16 +130,20 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
sprintf(dev->disk->disk_name, "nfhd%u", dev_id);
set_capacity(dev->disk, (sector_t)blocks * (bsize / 512));
blk_queue_logical_block_size(dev->disk->queue, bsize);
add_disk(dev->disk);
err = add_disk(dev->disk);
if (err)
goto out_cleanup_disk;

list_add_tail(&dev->list, &nfhd_list);

return 0;

out_cleanup_disk:
blk_cleanup_disk(dev->disk);
free_dev:
kfree(dev);
out:
return -ENOMEM;
return err;
}

static int __init nfhd_init(void)
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
14 changes: 10 additions & 4 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 Expand Up @@ -854,8 +855,8 @@ static const struct attribute_group *ubd_attr_groups[] = {
NULL,
};

static void ubd_disk_register(int major, u64 size, int unit,
struct gendisk *disk)
static int ubd_disk_register(int major, u64 size, int unit,
struct gendisk *disk)
{
disk->major = major;
disk->first_minor = unit << UBD_SHIFT;
Expand All @@ -872,7 +873,7 @@ static void ubd_disk_register(int major, u64 size, int unit,

disk->private_data = &ubd_devs[unit];
disk->queue = ubd_devs[unit].queue;
device_add_disk(&ubd_devs[unit].pdev.dev, disk, ubd_attr_groups);
return device_add_disk(&ubd_devs[unit].pdev.dev, disk, ubd_attr_groups);
}

#define ROUND_BLOCK(n) ((n + (SECTOR_SIZE - 1)) & (-SECTOR_SIZE))
Expand Down Expand Up @@ -919,10 +920,15 @@ static int ubd_add(int n, char **error_out)
blk_queue_write_cache(ubd_dev->queue, true, false);
blk_queue_max_segments(ubd_dev->queue, MAX_SG);
blk_queue_segment_boundary(ubd_dev->queue, PAGE_SIZE - 1);
ubd_disk_register(UBD_MAJOR, ubd_dev->size, n, disk);
err = ubd_disk_register(UBD_MAJOR, ubd_dev->size, n, disk);
if (err)
goto out_cleanup_disk;

ubd_gendisk[n] = disk;
return 0;

out_cleanup_disk:
blk_cleanup_disk(disk);
out_cleanup_tags:
blk_mq_free_tag_set(&ubd_dev->tag_set);
out:
Expand Down
16 changes: 12 additions & 4 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 Expand Up @@ -259,6 +258,7 @@ static int __init simdisk_setup(struct simdisk *dev, int which,
struct proc_dir_entry *procdir)
{
char tmp[2] = { '0' + which, 0 };
int err = -ENOMEM;

dev->fd = -1;
dev->filename = NULL;
Expand All @@ -267,18 +267,26 @@ static int __init simdisk_setup(struct simdisk *dev, int which,

dev->gd = blk_alloc_disk(NUMA_NO_NODE);
if (!dev->gd)
return -ENOMEM;
goto out;
dev->gd->major = simdisk_major;
dev->gd->first_minor = which;
dev->gd->minors = SIMDISK_MINORS;
dev->gd->fops = &simdisk_ops;
dev->gd->private_data = dev;
snprintf(dev->gd->disk_name, 32, "simdisk%d", which);
set_capacity(dev->gd, 0);
add_disk(dev->gd);
err = add_disk(dev->gd);
if (err)
goto out_cleanup_disk;

dev->procfile = proc_create_data(tmp, 0644, procdir, &simdisk_proc_ops, dev);

return 0;

out_cleanup_disk:
blk_cleanup_disk(dev->gd);
out:
return err;
}

static int __init simdisk_init(void)
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
Loading