Skip to content

Commit a0433f8

Browse files
committed
Merge tag 'for-6.5/block-2023-06-23' of git://git.kernel.dk/linux
Pull block updates from Jens Axboe: - NVMe pull request via Keith: - Various cleanups all around (Irvin, Chaitanya, Christophe) - Better struct packing (Christophe JAILLET) - Reduce controller error logs for optional commands (Keith) - Support for >=64KiB block sizes (Daniel Gomez) - Fabrics fixes and code organization (Max, Chaitanya, Daniel Wagner) - bcache updates via Coly: - Fix a race at init time (Mingzhe Zou) - Misc fixes and cleanups (Andrea, Thomas, Zheng, Ye) - use page pinning in the block layer for dio (David) - convert old block dio code to page pinning (David, Christoph) - cleanups for pktcdvd (Andy) - cleanups for rnbd (Guoqing) - use the unchecked __bio_add_page() for the initial single page additions (Johannes) - fix overflows in the Amiga partition handling code (Michael) - improve mq-deadline zoned device support (Bart) - keep passthrough requests out of the IO schedulers (Christoph, Ming) - improve support for flush requests, making them less special to deal with (Christoph) - add bdev holder ops and shutdown methods (Christoph) - fix the name_to_dev_t() situation and use cases (Christoph) - decouple the block open flags from fmode_t (Christoph) - ublk updates and cleanups, including adding user copy support (Ming) - BFQ sanity checking (Bart) - convert brd from radix to xarray (Pankaj) - constify various structures (Thomas, Ivan) - more fine grained persistent reservation ioctl capability checks (Jingbo) - misc fixes and cleanups (Arnd, Azeem, Demi, Ed, Hengqi, Hou, Jan, Jordy, Li, Min, Yu, Zhong, Waiman) * tag 'for-6.5/block-2023-06-23' of git://git.kernel.dk/linux: (266 commits) scsi/sg: don't grab scsi host module reference ext4: Fix warning in blkdev_put() block: don't return -EINVAL for not found names in devt_from_devname cdrom: Fix spectre-v1 gadget block: Improve kernel-doc headers blk-mq: don't insert passthrough request into sw queue bsg: make bsg_class a static const structure ublk: make ublk_chr_class a static const structure aoe: make aoe_class a static const structure block/rnbd: make all 'class' structures const block: fix the exclusive open mask in disk_scan_partitions block: add overflow checks for Amiga partition support block: change all __u32 annotations to __be32 in affs_hardblocks.h block: fix signed int overflow in Amiga partition support block: add capacity validation in bdev_add_partition() block: fine-granular CAP_SYS_ADMIN for Persistent Reservation block: disallow Persistent Reservation on partitions reiserfs: fix blkdev_put() warning from release_journal_dev() block: fix wrong mode for blkdev_get_by_dev() from disk_scan_partitions() block: document the holder argument to blkdev_get_by_path ...
2 parents 0aa69d5 + fcaa174 commit a0433f8

File tree

218 files changed

+4742
-3879
lines changed

Some content is hidden

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

218 files changed

+4742
-3879
lines changed

Documentation/admin-guide/bcache.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,6 @@ cache_miss_collisions
508508
cache miss, but raced with a write and data was already present (usually 0
509509
since the synchronization for cache misses was rewritten)
510510

511-
cache_readaheads
512-
Count of times readahead occurred.
513-
514511
Sysfs - cache set
515512
~~~~~~~~~~~~~~~~~
516513

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,31 +2022,33 @@ that attribute:
20222022
no-change
20232023
Do not modify the I/O priority class.
20242024

2025-
none-to-rt
2026-
For requests that do not have an I/O priority class (NONE),
2027-
change the I/O priority class into RT. Do not modify
2028-
the I/O priority class of other requests.
2025+
promote-to-rt
2026+
For requests that have a non-RT I/O priority class, change it into RT.
2027+
Also change the priority level of these requests to 4. Do not modify
2028+
the I/O priority of requests that have priority class RT.
20292029

20302030
restrict-to-be
20312031
For requests that do not have an I/O priority class or that have I/O
2032-
priority class RT, change it into BE. Do not modify the I/O priority
2033-
class of requests that have priority class IDLE.
2032+
priority class RT, change it into BE. Also change the priority level
2033+
of these requests to 0. Do not modify the I/O priority class of
2034+
requests that have priority class IDLE.
20342035

20352036
idle
20362037
Change the I/O priority class of all requests into IDLE, the lowest
20372038
I/O priority class.
20382039

2040+
none-to-rt
2041+
Deprecated. Just an alias for promote-to-rt.
2042+
20392043
The following numerical values are associated with the I/O priority policies:
20402044

2041-
+-------------+---+
2042-
| no-change | 0 |
2043-
+-------------+---+
2044-
| none-to-rt | 1 |
2045-
+-------------+---+
2046-
| rt-to-be | 2 |
2047-
+-------------+---+
2048-
| all-to-idle | 3 |
2049-
+-------------+---+
2045+
+----------------+---+
2046+
| no-change | 0 |
2047+
+----------------+---+
2048+
| rt-to-be | 2 |
2049+
+----------------+---+
2050+
| all-to-idle | 3 |
2051+
+----------------+---+
20502052

20512053
The numerical value that corresponds to each I/O priority class is as follows:
20522054

@@ -2062,9 +2064,13 @@ The numerical value that corresponds to each I/O priority class is as follows:
20622064

20632065
The algorithm to set the I/O priority class for a request is as follows:
20642066

2065-
- Translate the I/O priority class policy into a number.
2066-
- Change the request I/O priority class into the maximum of the I/O priority
2067-
class policy number and the numerical I/O priority class.
2067+
- If I/O priority class policy is promote-to-rt, change the request I/O
2068+
priority class to IOPRIO_CLASS_RT and change the request I/O priority
2069+
level to 4.
2070+
- If I/O priorityt class is not promote-to-rt, translate the I/O priority
2071+
class policy into a number, then change the request I/O priority class
2072+
into the maximum of the I/O priority class policy number and the numerical
2073+
I/O priority class.
20682074

20692075
PID
20702076
---

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5452,7 +5452,12 @@
54525452
port and the regular usb controller gets disabled.
54535453

54545454
root= [KNL] Root filesystem
5455-
See name_to_dev_t comment in init/do_mounts.c.
5455+
Usually this a a block device specifier of some kind,
5456+
see the early_lookup_bdev comment in
5457+
block/early-lookup.c for details.
5458+
Alternatively this can be "ram" for the legacy initial
5459+
ramdisk, "nfs" and "cifs" for root on a network file
5460+
system, or "mtd" and "ubi" for mounting from raw flash.
54565461

54575462
rootdelay= [KNL] Delay (in seconds) to pause before attempting to
54585463
mount the root filesystem

Documentation/core-api/pin_user_pages.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ pages:
112112
This also leads to limitations: there are only 31-10==21 bits available for a
113113
counter that increments 10 bits at a time.
114114

115+
* Because of that limitation, special handling is applied to the zero pages
116+
when using FOLL_PIN. We only pretend to pin a zero page - we don't alter its
117+
refcount or pincount at all (it is permanent, so there's no need). The
118+
unpinning functions also don't do anything to a zero page. This is
119+
transparent to the caller.
120+
115121
* Callers must specifically request "dma-pinned tracking of pages". In other
116122
words, just calling get_user_pages() will not suffice; a new set of functions,
117123
pin_user_page() and related, must be used.

arch/alpha/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ setup_arch(char **cmdline_p)
658658
#endif
659659

660660
/* Default root filesystem to sda2. */
661-
ROOT_DEV = Root_SDA2;
661+
ROOT_DEV = MKDEV(SCSI_DISK0_MAJOR, 2);
662662

663663
#ifdef CONFIG_EISA
664664
/* FIXME: only set this when we actually have EISA in this box? */

arch/ia64/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ setup_arch (char **cmdline_p)
627627
* is physical disk 1 partition 1 and the Linux root disk is
628628
* physical disk 1 partition 2.
629629
*/
630-
ROOT_DEV = Root_SDA2; /* default to second partition on first drive */
630+
ROOT_DEV = MKDEV(SCSI_DISK0_MAJOR, 2);
631631

632632
if (is_uv_system())
633633
uv_setup(cmdline_p);

arch/powerpc/platforms/powermac/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ int pmac_newworld;
7676

7777
static int current_root_goodness = -1;
7878

79-
#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
79+
/* sda1 - slightly silly choice */
80+
#define DEFAULT_ROOT_DEVICE MKDEV(SCSI_DISK0_MAJOR, 1)
8081

8182
sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN;
8283
EXPORT_SYMBOL(sys_ctrler);

arch/um/drivers/ubd_kern.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data)
108108
static DEFINE_MUTEX(ubd_lock);
109109
static DEFINE_MUTEX(ubd_mutex); /* replaces BKL, might not be needed */
110110

111-
static int ubd_open(struct block_device *bdev, fmode_t mode);
112-
static void ubd_release(struct gendisk *disk, fmode_t mode);
113-
static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
111+
static int ubd_open(struct gendisk *disk, blk_mode_t mode);
112+
static void ubd_release(struct gendisk *disk);
113+
static int ubd_ioctl(struct block_device *bdev, blk_mode_t mode,
114114
unsigned int cmd, unsigned long arg);
115115
static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
116116

@@ -1154,9 +1154,8 @@ static int __init ubd_driver_init(void){
11541154

11551155
device_initcall(ubd_driver_init);
11561156

1157-
static int ubd_open(struct block_device *bdev, fmode_t mode)
1157+
static int ubd_open(struct gendisk *disk, blk_mode_t mode)
11581158
{
1159-
struct gendisk *disk = bdev->bd_disk;
11601159
struct ubd *ubd_dev = disk->private_data;
11611160
int err = 0;
11621161

@@ -1171,19 +1170,12 @@ static int ubd_open(struct block_device *bdev, fmode_t mode)
11711170
}
11721171
ubd_dev->count++;
11731172
set_disk_ro(disk, !ubd_dev->openflags.w);
1174-
1175-
/* This should no more be needed. And it didn't work anyway to exclude
1176-
* read-write remounting of filesystems.*/
1177-
/*if((mode & FMODE_WRITE) && !ubd_dev->openflags.w){
1178-
if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev);
1179-
err = -EROFS;
1180-
}*/
11811173
out:
11821174
mutex_unlock(&ubd_mutex);
11831175
return err;
11841176
}
11851177

1186-
static void ubd_release(struct gendisk *disk, fmode_t mode)
1178+
static void ubd_release(struct gendisk *disk)
11871179
{
11881180
struct ubd *ubd_dev = disk->private_data;
11891181

@@ -1397,7 +1389,7 @@ static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
13971389
return 0;
13981390
}
13991391

1400-
static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
1392+
static int ubd_ioctl(struct block_device *bdev, blk_mode_t mode,
14011393
unsigned int cmd, unsigned long arg)
14021394
{
14031395
struct ubd *ubd_dev = bdev->bd_disk->private_data;

arch/xtensa/platforms/iss/simdisk.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ static void simdisk_submit_bio(struct bio *bio)
120120
bio_endio(bio);
121121
}
122122

123-
static int simdisk_open(struct block_device *bdev, fmode_t mode)
123+
static int simdisk_open(struct gendisk *disk, blk_mode_t mode)
124124
{
125-
struct simdisk *dev = bdev->bd_disk->private_data;
125+
struct simdisk *dev = disk->private_data;
126126

127127
spin_lock(&dev->lock);
128128
++dev->users;
129129
spin_unlock(&dev->lock);
130130
return 0;
131131
}
132132

133-
static void simdisk_release(struct gendisk *disk, fmode_t mode)
133+
static void simdisk_release(struct gendisk *disk)
134134
{
135135
struct simdisk *dev = disk->private_data;
136136
spin_lock(&dev->lock);

block/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ obj-y := bdev.o fops.o bio.o elevator.o blk-core.o blk-sysfs.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 \
12-
disk-events.o blk-ia-ranges.o
12+
disk-events.o blk-ia-ranges.o early-lookup.o
1313

1414
obj-$(CONFIG_BOUNCE) += bounce.o
1515
obj-$(CONFIG_BLK_DEV_BSG_COMMON) += bsg.o

0 commit comments

Comments
 (0)