Skip to content

Commit e1b1d03

Browse files
committed
Merge tag 'for-6.18/block-20250929' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull block updates from Jens Axboe: - NVMe pull request via Keith: - FC target fixes (Daniel) - Authentication fixes and updates (Martin, Chris) - Admin controller handling (Kamaljit) - Target lockdep assertions (Max) - Keep-alive updates for discovery (Alastair) - Suspend quirk (Georg) - MD pull request via Yu: - Add support for a lockless bitmap. A key feature for the new bitmap are that the IO fastpath is lockless. If a user issues lots of write IO to the same bitmap bit in a short time, only the first write has additional overhead to update bitmap bit, no additional overhead for the following writes. By supporting only resync or recover written data, means in the case creating new array or replacing with a new disk, there is no need to do a full disk resync/recovery. - Switch ->getgeo() and ->bios_param() to using struct gendisk rather than struct block_device. - Rust block changes via Andreas. This series adds configuration via configfs and remote completion to the rnull driver. The series also includes a set of changes to the rust block device driver API: a few cleanup patches, and a few features supporting the rnull changes. The series removes the raw buffer formatting logic from `kernel::block` and improves the logic available in `kernel::string` to support the same use as the removed logic. - floppy arch cleanups - Reduce the number of dereferencing needed for ublk commands - Restrict supported sockets for nbd. Mostly done to eliminate a class of issues perpetually reported by syzbot, by using nonsensical socket setups. - A few s390 dasd block fixes - Fix a few issues around atomic writes - Improve DMA interation for integrity requests - Improve how iovecs are treated with regards to O_DIRECT aligment constraints. We used to require each segment to adhere to the constraints, now only the request as a whole needs to. - Clean up and improve p2p support, enabling use of p2p for metadata payloads - Improve locking of request lookup, using SRCU where appropriate - Use page references properly for brd, avoiding very long RCU sections - Fix ordering of recursively submitted IOs - Clean up and improve updating nr_requests for a live device - Various fixes and cleanups * tag 'for-6.18/block-20250929' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (164 commits) s390/dasd: enforce dma_alignment to ensure proper buffer validation s390/dasd: Return BLK_STS_INVAL for EINVAL from do_dasd_request ublk: remove redundant zone op check in ublk_setup_iod() nvme: Use non zero KATO for persistent discovery connections nvmet: add safety check for subsys lock nvme-core: use nvme_is_io_ctrl() for I/O controller check nvme-core: do ioccsz/iorcsz validation only for I/O controllers nvme-core: add method to check for an I/O controller blk-cgroup: fix possible deadlock while configuring policy blk-mq: fix null-ptr-deref in blk_mq_free_tags() from error path blk-mq: Fix more tag iteration function documentation selftests: ublk: fix behavior when fio is not installed ublk: don't access ublk_queue in ublk_unmap_io() ublk: pass ublk_io to __ublk_complete_rq() ublk: don't access ublk_queue in ublk_need_complete_req() ublk: don't access ublk_queue in ublk_check_commit_and_fetch() ublk: don't pass ublk_queue to ublk_fetch() ublk: don't access ublk_queue in ublk_config_io_buf() ublk: don't access ublk_queue in ublk_check_fetch_buf() ublk: pass q_id and tag to __ublk_check_and_get_req() ...
2 parents 5832d26 + 130e6de commit e1b1d03

File tree

190 files changed

+4534
-1826
lines changed

Some content is hidden

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

190 files changed

+4534
-1826
lines changed

Documentation/ABI/stable/sysfs-block

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -603,16 +603,10 @@ Date: July 2003
603603
Contact: linux-block@vger.kernel.org
604604
Description:
605605
[RW] This controls how many requests may be allocated in the
606-
block layer for read or write requests. Note that the total
607-
allocated number may be twice this amount, since it applies only
608-
to reads or writes (not the accumulated sum).
609-
610-
To avoid priority inversion through request starvation, a
611-
request queue maintains a separate request pool per each cgroup
612-
when CONFIG_BLK_CGROUP is enabled, and this parameter applies to
613-
each such per-block-cgroup request pool. IOW, if there are N
614-
block cgroups, each request queue may have up to N request
615-
pools, each independently regulated by nr_requests.
606+
block layer. Noted this value only represents the quantity for a
607+
single blk_mq_tags instance. The actual number for the entire
608+
device depends on the hardware queue count, whether elevator is
609+
enabled, and whether tags are shared.
616610

617611

618612
What: /sys/block/<disk>/queue/nr_zones

Documentation/admin-guide/md.rst

Lines changed: 61 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,54 @@ All md devices contain:
347347
active-idle
348348
like active, but no writes have been seen for a while (safe_mode_delay).
349349

350+
consistency_policy
351+
This indicates how the array maintains consistency in case of unexpected
352+
shutdown. It can be:
353+
354+
none
355+
Array has no redundancy information, e.g. raid0, linear.
356+
357+
resync
358+
Full resync is performed and all redundancy is regenerated when the
359+
array is started after unclean shutdown.
360+
361+
bitmap
362+
Resync assisted by a write-intent bitmap.
363+
364+
journal
365+
For raid4/5/6, journal device is used to log transactions and replay
366+
after unclean shutdown.
367+
368+
ppl
369+
For raid5 only, Partial Parity Log is used to close the write hole and
370+
eliminate resync.
371+
372+
The accepted values when writing to this file are ``ppl`` and ``resync``,
373+
used to enable and disable PPL.
374+
375+
uuid
376+
This indicates the UUID of the array in the following format:
377+
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
378+
379+
bitmap_type
380+
[RW] When read, this file will display the current and available
381+
bitmap for this array. The currently active bitmap will be enclosed
382+
in [] brackets. Writing an bitmap name or ID to this file will switch
383+
control of this array to that new bitmap. Note that writing a new
384+
bitmap for created array is forbidden.
385+
386+
none
387+
No bitmap
388+
bitmap
389+
The default internal bitmap
390+
llbitmap
391+
The lockless internal bitmap
392+
393+
If bitmap_type is not none, then additional bitmap attributes bitmap/xxx or
394+
llbitmap/xxx will be created after md device KOBJ_CHANGE event.
395+
396+
If bitmap_type is bitmap, then the md device will also contain:
397+
350398
bitmap/location
351399
This indicates where the write-intent bitmap for the array is
352400
stored.
@@ -401,35 +449,23 @@ All md devices contain:
401449
once the array becomes non-degraded, and this fact has been
402450
recorded in the metadata.
403451

404-
consistency_policy
405-
This indicates how the array maintains consistency in case of unexpected
406-
shutdown. It can be:
407-
408-
none
409-
Array has no redundancy information, e.g. raid0, linear.
410-
411-
resync
412-
Full resync is performed and all redundancy is regenerated when the
413-
array is started after unclean shutdown.
414-
415-
bitmap
416-
Resync assisted by a write-intent bitmap.
452+
If bitmap_type is llbitmap, then the md device will also contain:
417453

418-
journal
419-
For raid4/5/6, journal device is used to log transactions and replay
420-
after unclean shutdown.
454+
llbitmap/bits
455+
This is read-only, show status of bitmap bits, the number of each
456+
value.
421457

422-
ppl
423-
For raid5 only, Partial Parity Log is used to close the write hole and
424-
eliminate resync.
425-
426-
The accepted values when writing to this file are ``ppl`` and ``resync``,
427-
used to enable and disable PPL.
458+
llbitmap/metadata
459+
This is read-only, show bitmap metadata, include chunksize, chunkshift,
460+
chunks, offset and daemon_sleep.
428461

429-
uuid
430-
This indicates the UUID of the array in the following format:
431-
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
462+
llbitmap/daemon_sleep
463+
This is read-write, time in seconds that daemon function will be
464+
triggered to clear dirty bits.
432465

466+
llbitmap/barrier_idle
467+
This is read-write, time in seconds that page barrier will be idled,
468+
means dirty bits in the page will be cleared.
433469

434470
As component devices are added to an md array, they appear in the ``md``
435471
directory as new directories named::

Documentation/filesystems/locking.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ prototypes::
443443
int (*direct_access) (struct block_device *, sector_t, void **,
444444
unsigned long *);
445445
void (*unlock_native_capacity) (struct gendisk *);
446-
int (*getgeo)(struct block_device *, struct hd_geometry *);
446+
int (*getgeo)(struct gendisk *, struct hd_geometry *);
447447
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
448448

449449
locking rules:

Documentation/scsi/scsi_mid_low_api.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ Details::
380380

381381
/**
382382
* scsi_bios_ptable - return copy of block device's partition table
383-
* @dev: pointer to block device
383+
* @dev: pointer to gendisk
384384
*
385385
* Returns pointer to partition table, or NULL for failure
386386
*
@@ -390,7 +390,7 @@ Details::
390390
*
391391
* Defined in: drivers/scsi/scsicam.c
392392
**/
393-
unsigned char *scsi_bios_ptable(struct block_device *dev)
393+
unsigned char *scsi_bios_ptable(struct gendisk *dev)
394394

395395

396396
/**
@@ -623,7 +623,7 @@ Details::
623623
* bios_param - fetch head, sector, cylinder info for a disk
624624
* @sdev: pointer to scsi device context (defined in
625625
* include/scsi/scsi_device.h)
626-
* @bdev: pointer to block device context (defined in fs.h)
626+
* @disk: pointer to gendisk (defined in blkdev.h)
627627
* @capacity: device size (in 512 byte sectors)
628628
* @params: three element array to place output:
629629
* params[0] number of heads (max 255)
@@ -643,7 +643,7 @@ Details::
643643
*
644644
* Optionally defined in: LLD
645645
**/
646-
int bios_param(struct scsi_device * sdev, struct block_device *bdev,
646+
int bios_param(struct scsi_device * sdev, struct gendisk *disk,
647647
sector_t capacity, int params[3])
648648

649649

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4382,7 +4382,7 @@ W: https://rust-for-linux.com
43824382
B: https://github.com/Rust-for-Linux/linux/issues
43834383
C: https://rust-for-linux.zulipchat.com/#narrow/stream/Block
43844384
T: git https://github.com/Rust-for-Linux/linux.git rust-block-next
4385-
F: drivers/block/rnull.rs
4385+
F: drivers/block/rnull/
43864386
F: rust/kernel/block.rs
43874387
F: rust/kernel/block/
43884388

arch/alpha/include/asm/floppy.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,6 @@ static int FDC2 = -1;
9090
#define N_FDC 2
9191
#define N_DRIVE 8
9292

93-
/*
94-
* Most Alphas have no problems with floppy DMA crossing 64k borders,
95-
* except for certain ones, like XL and RUFFIAN.
96-
*
97-
* However, the test is simple and fast, and this *is* floppy, after all,
98-
* so we do it for all platforms, just to make sure.
99-
*
100-
* This is advantageous in other circumstances as well, as in moving
101-
* about the PCI DMA windows and forcing the floppy to start doing
102-
* scatter-gather when it never had before, and there *is* a problem
103-
* on that platform... ;-}
104-
*/
105-
106-
static inline unsigned long CROSS_64KB(void *a, unsigned long s)
107-
{
108-
unsigned long p = (unsigned long)a;
109-
return ((p + s - 1) ^ p) & ~0xffffUL;
110-
}
111-
11293
#define EXTRA_FLOPPY_PARAMS
11394

11495
#endif /* __ASM_ALPHA_FLOPPY_H */

arch/arm/include/asm/floppy.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ static unsigned char floppy_selects[4] = { 0x10, 0x21, 0x23, 0x33 };
6565
#define N_FDC 1
6666
#define N_DRIVE 4
6767

68-
#define CROSS_64KB(a,s) (0)
69-
7068
/*
7169
* This allows people to reverse the order of
7270
* fd0 and fd1, in case their hardware is

arch/m68k/emu/nfblock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ static void nfhd_submit_bio(struct bio *bio)
7777
bio_endio(bio);
7878
}
7979

80-
static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
80+
static int nfhd_getgeo(struct gendisk *disk, struct hd_geometry *geo)
8181
{
82-
struct nfhd_device *dev = bdev->bd_disk->private_data;
82+
struct nfhd_device *dev = disk->private_data;
8383

8484
geo->cylinders = dev->blocks >> (6 - dev->bshift);
8585
geo->heads = 4;

arch/m68k/include/asm/floppy.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,9 @@ static void fd_free_irq(void)
107107

108108
#define fd_free_dma() /* nothing */
109109

110-
/* No 64k boundary crossing problems on Q40 - no DMA at all */
111-
#define CROSS_64KB(a,s) (0)
112-
113110
#define DMA_MODE_READ 0x44 /* i386 look-alike */
114111
#define DMA_MODE_WRITE 0x48
115112

116-
117113
static int m68k_floppy_init(void)
118114
{
119115
use_virtual_dma =1;

arch/mips/include/asm/floppy.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@ static inline void fd_cacheflush(char * addr, long size)
3434
#define N_FDC 1 /* do you *really* want a second controller? */
3535
#define N_DRIVE 8
3636

37-
/*
38-
* The DMA channel used by the floppy controller cannot access data at
39-
* addresses >= 16MB
40-
*
41-
* Went back to the 1MB limit, as some people had problems with the floppy
42-
* driver otherwise. It doesn't matter much for performance anyway, as most
43-
* floppy accesses go through the track buffer.
44-
*
45-
* On MIPSes using vdma, this actually means that *all* transfers go thru
46-
* the * track buffer since 0x1000000 is always smaller than KSEG0/1.
47-
* Actually this needs to be a bit more complicated since the so much different
48-
* hardware available with MIPS CPUs ...
49-
*/
50-
#define CROSS_64KB(a, s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
51-
5237
#define EXTRA_FLOPPY_PARAMS
5338

5439
#include <floppy.h>

0 commit comments

Comments
 (0)