Skip to content

Commit 9caaa66

Browse files
committed
Merge branch 'for-5.9/block' into for-5.9/block-merge
* for-5.9/block: (124 commits) blk-cgroup: show global disk stats in root cgroup io.stat blk-cgroup: make iostat functions visible to stat printing block: improve discard bio alignment in __blkdev_issue_discard() block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers block: defer flush request no matter whether we have elevator block: make blk_timeout_init() static block: remove retry loop in ioc_release_fn() block: remove unnecessary ioc nested locking block: integrate bd_start_claiming into __blkdev_get block: use bd_prepare_to_claim directly in the loop driver block: refactor bd_start_claiming block: simplify the restart case in __blkdev_get Revert "blk-rq-qos: remove redundant finish_wait to rq_qos_wait." block: always remove partitions from blk_drop_partitions() block: relax jiffies rounding for timeouts blk-mq: remove redundant validation in __blk_mq_end_request() blk-mq: Remove unnecessary local variable writeback: remove bdi->congested_fn writeback: remove struct bdi_writeback_congested writeback: remove {set,clear}_wb_congested ...
2 parents ba47d84 + ef45fe4 commit 9caaa66

File tree

154 files changed

+1799
-2595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+1799
-2595
lines changed

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,8 +1483,7 @@ IO Interface Files
14831483
~~~~~~~~~~~~~~~~~~
14841484

14851485
io.stat
1486-
A read-only nested-keyed file which exists on non-root
1487-
cgroups.
1486+
A read-only nested-keyed file.
14881487

14891488
Lines are keyed by $MAJ:$MIN device numbers and not ordered.
14901489
The following nested keys are defined.

Documentation/block/biodoc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ Now the generic block layer performs partition-remapping early and thus
10361036
provides drivers with a sector number relative to whole device, rather than
10371037
having to take partition number into account in order to arrive at the true
10381038
sector number. The routine blk_partition_remap() is invoked by
1039-
generic_make_request even before invoking the queue specific make_request_fn,
1039+
submit_bio_noacct even before invoking the queue specific ->submit_bio,
10401040
so the i/o scheduler also gets to operate on whole disk sector numbers. This
10411041
should typically not require changes to block drivers, it just never gets
10421042
to invoke its own partition sector offset calculations since all bios

Documentation/block/writeback_cache_control.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ the Forced Unit Access is implemented. The REQ_PREFLUSH and REQ_FUA flags
4747
may both be set on a single bio.
4848

4949

50-
Implementation details for make_request_fn based block drivers
50+
Implementation details for bio based block drivers
5151
--------------------------------------------------------------
5252

5353
These drivers will always see the REQ_PREFLUSH and REQ_FUA bits as they sit

Documentation/cdrom/cdrom-standard.rst

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ with the kernel as a block device by registering the following general
157157
cdrom_release, /∗ release ∗/
158158
NULL, /∗ fsync ∗/
159159
NULL, /∗ fasync ∗/
160-
cdrom_media_changed, /∗ media change ∗/
161160
NULL /∗ revalidate ∗/
162161
};
163162

@@ -366,19 +365,6 @@ which may or may not be in the drive). If the drive is not a changer,
366365
CDS_DRIVE_NOT_READY /* something is wrong, tray is moving? */
367366
CDS_DISC_OK /* a disc is loaded and everything is fine */
368367

369-
::
370-
371-
int media_changed(struct cdrom_device_info *cdi, int disc_nr)
372-
373-
This function is very similar to the original function in $struct
374-
file_operations*. It returns 1 if the medium of the device *cdi->dev*
375-
has changed since the last call, and 0 otherwise. The parameter
376-
*disc_nr* identifies a specific slot in a juke-box, it should be
377-
ignored for single-disc drives. Note that by `re-routing` this
378-
function through *cdrom_media_changed()*, we can implement separate
379-
queues for the VFS and a new *ioctl()* function that can report device
380-
changes to software (e. g., an auto-mounting daemon).
381-
382368
::
383369

384370
int tray_move(struct cdrom_device_info *cdi, int position)
@@ -917,9 +903,7 @@ commands can be identified by the underscores in their names.
917903
maximum number of discs in the juke-box found in the *cdrom_dops*.
918904
`CDROM_MEDIA_CHANGED`
919905
Returns 1 if a disc has been changed since the last call.
920-
Note that calls to *cdrom_media_changed* by the VFS are treated
921-
by an independent queue, so both mechanisms will detect a
922-
media change once. For juke-boxes, an extra argument *arg*
906+
For juke-boxes, an extra argument *arg*
923907
specifies the slot for which the information is given. The special
924908
value *CDSL_CURRENT* requests that information about the currently
925909
selected slot be returned.

Documentation/fault-injection/fault-injection.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Available fault injection capabilities
2424

2525
injects disk IO errors on devices permitted by setting
2626
/sys/block/<device>/make-it-fail or
27-
/sys/block/<device>/<partition>/make-it-fail. (generic_make_request())
27+
/sys/block/<device>/<partition>/make-it-fail. (submit_bio_noacct())
2828

2929
- fail_mmc_request
3030

Documentation/filesystems/locking.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ prototypes::
467467
int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
468468
int (*direct_access) (struct block_device *, sector_t, void **,
469469
unsigned long *);
470-
int (*media_changed) (struct gendisk *);
471470
void (*unlock_native_capacity) (struct gendisk *);
472471
int (*revalidate_disk) (struct gendisk *);
473472
int (*getgeo)(struct block_device *, struct hd_geometry *);
@@ -483,14 +482,13 @@ release: yes
483482
ioctl: no
484483
compat_ioctl: no
485484
direct_access: no
486-
media_changed: no
487485
unlock_native_capacity: no
488486
revalidate_disk: no
489487
getgeo: no
490488
swap_slot_free_notify: no (see below)
491489
======================= ===================
492490

493-
media_changed, unlock_native_capacity and revalidate_disk are called only from
491+
unlock_native_capacity and revalidate_disk are called only from
494492
check_disk_change().
495493

496494
swap_slot_free_notify is called with swap_lock and sometimes the page lock

Documentation/trace/ftrace.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ function-trace, we get a much larger output::
14531453
=> __blk_run_queue_uncond
14541454
=> __blk_run_queue
14551455
=> blk_queue_bio
1456-
=> generic_make_request
1456+
=> submit_bio_noacct
14571457
=> submit_bio
14581458
=> submit_bh
14591459
=> __ext3_get_inode_loc
@@ -1738,7 +1738,7 @@ tracers.
17381738
=> __blk_run_queue_uncond
17391739
=> __blk_run_queue
17401740
=> blk_queue_bio
1741-
=> generic_make_request
1741+
=> submit_bio_noacct
17421742
=> submit_bio
17431743
=> submit_bh
17441744
=> ext3_bread

arch/m68k/emu/nfblock.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ struct nfhd_device {
5959
struct gendisk *disk;
6060
};
6161

62-
static blk_qc_t nfhd_make_request(struct request_queue *queue, struct bio *bio)
62+
static blk_qc_t nfhd_submit_bio(struct bio *bio)
6363
{
64-
struct nfhd_device *dev = queue->queuedata;
64+
struct nfhd_device *dev = bio->bi_disk->private_data;
6565
struct bio_vec bvec;
6666
struct bvec_iter iter;
6767
int dir, len, shift;
@@ -93,6 +93,7 @@ static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
9393

9494
static const struct block_device_operations nfhd_ops = {
9595
.owner = THIS_MODULE,
96+
.submit_bio = nfhd_submit_bio,
9697
.getgeo = nfhd_getgeo,
9798
};
9899

@@ -118,11 +119,10 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
118119
dev->bsize = bsize;
119120
dev->bshift = ffs(bsize) - 10;
120121

121-
dev->queue = blk_alloc_queue(nfhd_make_request, NUMA_NO_NODE);
122+
dev->queue = blk_alloc_queue(NUMA_NO_NODE);
122123
if (dev->queue == NULL)
123124
goto free_dev;
124125

125-
dev->queue->queuedata = dev;
126126
blk_queue_logical_block_size(dev->queue, bsize);
127127

128128
dev->disk = alloc_disk(16);

arch/xtensa/platforms/iss/simdisk.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ static void simdisk_transfer(struct simdisk *dev, unsigned long sector,
101101
spin_unlock(&dev->lock);
102102
}
103103

104-
static blk_qc_t simdisk_make_request(struct request_queue *q, struct bio *bio)
104+
static blk_qc_t simdisk_submit_bio(struct bio *bio)
105105
{
106-
struct simdisk *dev = q->queuedata;
106+
struct simdisk *dev = bio->bi_disk->private_data;
107107
struct bio_vec bvec;
108108
struct bvec_iter iter;
109109
sector_t sector = bio->bi_iter.bi_sector;
@@ -127,8 +127,6 @@ static int simdisk_open(struct block_device *bdev, fmode_t mode)
127127
struct simdisk *dev = bdev->bd_disk->private_data;
128128

129129
spin_lock(&dev->lock);
130-
if (!dev->users)
131-
check_disk_change(bdev);
132130
++dev->users;
133131
spin_unlock(&dev->lock);
134132
return 0;
@@ -144,6 +142,7 @@ static void simdisk_release(struct gendisk *disk, fmode_t mode)
144142

145143
static const struct block_device_operations simdisk_ops = {
146144
.owner = THIS_MODULE,
145+
.submit_bio = simdisk_submit_bio,
147146
.open = simdisk_open,
148147
.release = simdisk_release,
149148
};
@@ -267,14 +266,12 @@ static int __init simdisk_setup(struct simdisk *dev, int which,
267266
spin_lock_init(&dev->lock);
268267
dev->users = 0;
269268

270-
dev->queue = blk_alloc_queue(simdisk_make_request, NUMA_NO_NODE);
269+
dev->queue = blk_alloc_queue(NUMA_NO_NODE);
271270
if (dev->queue == NULL) {
272271
pr_err("blk_alloc_queue failed\n");
273272
goto out_alloc_queue;
274273
}
275274

276-
dev->queue->queuedata = dev;
277-
278275
dev->gd = alloc_disk(SIMDISK_MINORS);
279276
if (dev->gd == NULL) {
280277
pr_err("alloc_disk failed\n");

block/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
obj-$(CONFIG_BLOCK) := bio.o elevator.o blk-core.o blk-sysfs.o \
77
blk-flush.o blk-settings.o blk-ioc.o blk-map.o \
8-
blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \
8+
blk-exec.o blk-merge.o blk-timeout.o \
99
blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
1010
blk-mq-sysfs.o blk-mq-cpumap.o blk-mq-sched.o ioctl.o \
1111
genhd.o ioprio.o badblocks.o partitions/ blk-rq-qos.o

0 commit comments

Comments
 (0)