History

Merge tag 'for-6.19/block-20251201' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull block updates from Jens Axboe: - Fix head insertion for mq-deadline, a regression from when priority support was added - Series simplifying and improving the ublk user copy code - Various ublk related cleanups - Fixup REQ_NOWAIT handling in loop/zloop, clearing NOWAIT when the request is punted to a thread for handling - Merge and then later revert loop dio nowait support, as it ended up causing excessive stack usage for when the inline issue code needs to dip back into the full file system code - Improve auto integrity code, making it less deadlock prone - Speedup polled IO handling, but manually managing the hctx lookups - Fixes for blk-throttle for SSD devices - Small series with fixes for the S390 dasd driver - Add support for caching zones, avoiding unnecessary report zone queries - MD pull requests via Yu: - fix null-ptr-dereference regression for dm-raid0 - fix IO hang for raid5 when array is broken with IO inflight - remove legacy 1s delay to speed up system shutdown - change maintainer's email address - data can be lost if array is created with different lbs devices, fix this problem and record lbs of the array in metadata - fix rcu protection for md_thread - fix mddev kobject lifetime regression - enable atomic writes for md-linear - some cleanups - bcache updates via Coly - remove useless discard and cache device code - improve usage of per-cpu workqueues - Reorganize the IO scheduler switching code, fixing some lockdep reports as well - Improve the block layer P2P DMA support - Add support to the block tracing code for zoned devices - Segment calculation improves, and memory alignment flexibility improvements - Set of prep and cleanups patches for ublk batching support. The actual batching hasn't been added yet, but helps shrink down the workload of getting that patchset ready for 6.20 - Fix for how the ps3 block driver handles segments offsets - Improve how block plugging handles batch tag allocations - nbd fixes for use-after-free of the configuration on device clear/put - Set of improvements and fixes for zloop - Add Damien as maintainer of the block zoned device code handling - Various other fixes and cleanups * tag 'for-6.19/block-20251201' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (162 commits) block/rnbd: correct all kernel-doc complaints blk-mq: use queue_hctx in blk_mq_map_queue_type md: remove legacy 1s delay in md_notify_reboot md/raid5: fix IO hang when array is broken with IO inflight md: warn about updating super block failure md/raid0: fix NULL pointer dereference in create_strip_zones() for dm-raid sbitmap: fix all kernel-doc warnings ublk: add helper of __ublk_fetch() ublk: pass const pointer to ublk_queue_is_zoned() ublk: refactor auto buffer register in ublk_dispatch_req() ublk: add `union ublk_io_buf` with improved naming ublk: add parameter `struct io_uring_cmd *` to ublk_prep_auto_buf_reg() kfifo: add kfifo_alloc_node() helper for NUMA awareness blk-mq: fix potential uaf for 'queue_hw_ctx' blk-mq: use array manage hctx map instead of xarray ublk: prevent invalid access with DEBUG s390/dasd: Use scnprintf() instead of sprintf() s390/dasd: Move device name formatting into separate function s390/dasd: Remove unnecessary debugfs_create() return checks s390/dasd: Fix gendisk parent after copy pair swap ...

Linus Torvalds committed 11 months ago

Commit cc25df32 parents 0abcfd8 d211a28108 files · +3019 −1557Browse files

Showing the changes to include/uapi (4 of 108 files). Show all

Unified · Split

4 files
  1. include/uapi/linux/blktrace_api.h +53 −2
  2. include/uapi/linux/blkzoned.h +41 −5
  3. include/uapi/linux/fs.h +2 −1
  4. include/uapi/linux/raid/md_p.h +2 −1
include/uapi/linux/blktrace_api.h+53−2
@@ -26,11 +26,22 @@ enum blktrace_cat { · 25 unmodified lines
26 BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */26 BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */
27 BLK_TC_FUA = 1 << 15, /* fua requests */27 BLK_TC_FUA = 1 << 15, /* fua requests */
28 28
29 BLK_TC_END = 1 << 15, /* we've run out of bits! */29 BLK_TC_END_V1 = 1 << 15, /* we've run out of bits! */
30
31 BLK_TC_ZONE_APPEND = 1ull << 16, /* zone append */
32 BLK_TC_ZONE_RESET = 1ull << 17, /* zone reset */
33 BLK_TC_ZONE_RESET_ALL = 1ull << 18, /* zone reset all */
34 BLK_TC_ZONE_FINISH = 1ull << 19, /* zone finish */
35 BLK_TC_ZONE_OPEN = 1ull << 20, /* zone open */
36 BLK_TC_ZONE_CLOSE = 1ull << 21, /* zone close */
37
38 BLK_TC_WRITE_ZEROES = 1ull << 22, /* write-zeroes */
39
40 BLK_TC_END_V2 = 1ull << 22,
30};41};
31 42
32#define BLK_TC_SHIFT (16)43#define BLK_TC_SHIFT (16)
33#define BLK_TC_ACT(act) ((act) << BLK_TC_SHIFT)44#define BLK_TC_ACT(act) ((u64)(act) << BLK_TC_SHIFT)
34 45
35/*46/*
36 * Basic trace actions47 * Basic trace actions
@@ -53,6 +64,8 @@ enum blktrace_act { · 16 unmodified lines
53 __BLK_TA_REMAP, /* bio was remapped */64 __BLK_TA_REMAP, /* bio was remapped */
54 __BLK_TA_ABORT, /* request aborted */65 __BLK_TA_ABORT, /* request aborted */
55 __BLK_TA_DRV_DATA, /* driver-specific binary data */66 __BLK_TA_DRV_DATA, /* driver-specific binary data */
67 __BLK_TA_ZONE_PLUG, /* zone write plug was plugged */
68 __BLK_TA_ZONE_UNPLUG, /* zone write plug was unplugged */
56 __BLK_TA_CGROUP = 1 << 8, /* from a cgroup*/69 __BLK_TA_CGROUP = 1 << 8, /* from a cgroup*/
57};70};
58 71
@@ -88,12 +101,19 @@ enum blktrace_notify { · 29 unmodified lines
88#define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE))101#define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE))
89#define BLK_TA_DRV_DATA (__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA))102#define BLK_TA_DRV_DATA (__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA))
90 103
104#define BLK_TA_ZONE_APPEND (__BLK_TA_COMPLETE |\
105 BLK_TC_ACT(BLK_TC_ZONE_APPEND))
106#define BLK_TA_ZONE_PLUG (__BLK_TA_ZONE_PLUG | BLK_TC_ACT(BLK_TC_QUEUE))
107#define BLK_TA_ZONE_UNPLUG (__BLK_TA_ZONE_UNPLUG |\
108 BLK_TC_ACT(BLK_TC_QUEUE))
109
91#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))110#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
92#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))111#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
93#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))112#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))
94 113
95#define BLK_IO_TRACE_MAGIC 0x65617400114#define BLK_IO_TRACE_MAGIC 0x65617400
96#define BLK_IO_TRACE_VERSION 0x07115#define BLK_IO_TRACE_VERSION 0x07
116#define BLK_IO_TRACE2_VERSION 0x08
97 117
98/*118/*
99 * The trace itself119 * The trace itself
@@ -113,6 +133,21 @@ struct blk_io_trace { · 13 unmodified lines
113 /* cgroup id will be stored here if exists */133 /* cgroup id will be stored here if exists */
114};134};
115 135
136struct blk_io_trace2 {
137 __u32 magic; /* MAGIC << 8 | BLK_IO_TRACE2_VERSION */
138 __u32 sequence; /* event number */
139 __u64 time; /* in nanoseconds */
140 __u64 sector; /* disk offset */
141 __u32 bytes; /* transfer length */
142 __u32 pid; /* who did it */
143 __u64 action; /* what happened */
144 __u32 device; /* device number */
145 __u32 cpu; /* on what cpu did it happen */
146 __u16 error; /* completion error */
147 __u16 pdu_len; /* length of data after this trace */
148 __u8 pad[12];
149 /* cgroup id will be stored here if it exists */
150};
116/*151/*
117 * The remap event152 * The remap event
118 */153 */
@@ -129,6 +164,7 @@ enum { · 10 unmodified lines
129};164};
130 165
131#define BLKTRACE_BDEV_SIZE 32166#define BLKTRACE_BDEV_SIZE 32
167#define BLKTRACE_BDEV_SIZE2 64
132 168
133/*169/*
134 * User setup structure passed with BLKTRACESETUP170 * User setup structure passed with BLKTRACESETUP
@@ -143,4 +179,19 @@ struct blk_user_trace_setup { · 8 unmodified lines
143 __u32 pid;179 __u32 pid;
144};180};
145 181
182/*
183 * User setup structure passed with BLKTRACESETUP2
184 */
185struct blk_user_trace_setup2 {
186 char name[BLKTRACE_BDEV_SIZE2]; /* output */
187 __u64 act_mask; /* input */
188 __u32 buf_size; /* input */
189 __u32 buf_nr; /* input */
190 __u64 start_lba;
191 __u64 end_lba;
192 __u32 pid;
193 __u32 flags; /* currently unused */
194 __u64 reserved[11];
195};
196
146#endif /* _UAPIBLKTRACE_H */197#endif /* _UAPIBLKTRACE_H */
include/uapi/linux/blkzoned.h+41−5
@@ -48,6 +48,8 @@ enum blk_zone_type { · 47 unmodified lines
48 * FINISH ZONE command.48 * FINISH ZONE command.
49 * @BLK_ZONE_COND_READONLY: The zone is read-only.49 * @BLK_ZONE_COND_READONLY: The zone is read-only.
50 * @BLK_ZONE_COND_OFFLINE: The zone is offline (sectors cannot be read/written).50 * @BLK_ZONE_COND_OFFLINE: The zone is offline (sectors cannot be read/written).
51 * @BLK_ZONE_COND_ACTIVE: The zone is either implicitly open, explicitly open,
52 * or closed.
51 *53 *
52 * The Zone Condition state machine in the ZBC/ZAC standards maps the above54 * The Zone Condition state machine in the ZBC/ZAC standards maps the above
53 * deinitions as:55 * deinitions as:
@@ -61,6 +63,13 @@ enum blk_zone_type { · 7 unmodified lines
61 *63 *
62 * Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should64 * Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should
63 * be considered invalid.65 * be considered invalid.
66 *
67 * The condition BLK_ZONE_COND_ACTIVE is used only with cached zone reports.
68 * It is used to report any of the BLK_ZONE_COND_IMP_OPEN,
69 * BLK_ZONE_COND_EXP_OPEN and BLK_ZONE_COND_CLOSED conditions. Conversely, a
70 * regular zone report will never report a zone condition using
71 * BLK_ZONE_COND_ACTIVE and instead use the conditions BLK_ZONE_COND_IMP_OPEN,
72 * BLK_ZONE_COND_EXP_OPEN or BLK_ZONE_COND_CLOSED as reported by the device.
64 */73 */
65enum blk_zone_cond {74enum blk_zone_cond {
66 BLK_ZONE_COND_NOT_WP = 0x0,75 BLK_ZONE_COND_NOT_WP = 0x0,
@@ -71,15 +80,27 @@ enum blk_zone_cond { · 4 unmodified lines
71 BLK_ZONE_COND_READONLY = 0xD,80 BLK_ZONE_COND_READONLY = 0xD,
72 BLK_ZONE_COND_FULL = 0xE,81 BLK_ZONE_COND_FULL = 0xE,
73 BLK_ZONE_COND_OFFLINE = 0xF,82 BLK_ZONE_COND_OFFLINE = 0xF,
83
84 BLK_ZONE_COND_ACTIVE = 0xFF,
74};85};
75 86
76/**87/**
77 * enum blk_zone_report_flags - Feature flags of reported zone descriptors.88 * enum blk_zone_report_flags - Feature flags of reported zone descriptors.
78 *89 *
79 * @BLK_ZONE_REP_CAPACITY: Zone descriptor has capacity field.90 * @BLK_ZONE_REP_CAPACITY: Output only. Indicates that zone descriptors in a
91 * zone report have a valid capacity field.
92 * @BLK_ZONE_REP_CACHED: Input only. Indicates that the zone report should be
93 * generated using cached zone information. In this case,
94 * the implicit open, explicit open and closed zone
95 * conditions are all reported with the
96 * BLK_ZONE_COND_ACTIVE condition.
80 */97 */
81enum blk_zone_report_flags {98enum blk_zone_report_flags {
82 BLK_ZONE_REP_CAPACITY = (1 << 0),99 /* Output flags */
100 BLK_ZONE_REP_CAPACITY = (1U << 0),
101
102 /* Input flags */
103 BLK_ZONE_REP_CACHED = (1U << 31),
83};104};
84 105
85/**106/**
@@ -122,6 +143,10 @@ struct blk_zone { · 36 unmodified lines
122 * @sector: starting sector of report143 * @sector: starting sector of report
123 * @nr_zones: IN maximum / OUT actual144 * @nr_zones: IN maximum / OUT actual
124 * @flags: one or more flags as defined by enum blk_zone_report_flags.145 * @flags: one or more flags as defined by enum blk_zone_report_flags.
146 * @flags: one or more flags as defined by enum blk_zone_report_flags.
147 * With BLKREPORTZONE, this field is ignored as an input and is valid
148 * only as an output. Using BLKREPORTZONEV2, this field is used as both
149 * input and output.
125 * @zones: Space to hold @nr_zones @zones entries on reply.150 * @zones: Space to hold @nr_zones @zones entries on reply.
126 *151 *
127 * The array of at most @nr_zones must follow this structure in memory.152 * The array of at most @nr_zones must follow this structure in memory.
@@ -148,9 +173,19 @@ struct blk_zone_range { · 20 unmodified lines
148/**173/**
149 * Zoned block device ioctl's:174 * Zoned block device ioctl's:
150 *175 *
151 * @BLKREPORTZONE: Get zone information. Takes a zone report as argument.176 * @BLKREPORTZONE: Get zone information from a zoned device. Takes a zone report
152 * The zone report will start from the zone containing the177 * as argument. The zone report will start from the zone
153 * sector specified in the report request structure.178 * containing the sector specified in struct blk_zone_report.
179 * The flags field of struct blk_zone_report is used as an
180 * output only and ignored as an input.
181 * DEPRECATED, use BLKREPORTZONEV2 instead.
182 * @BLKREPORTZONEV2: Same as @BLKREPORTZONE but uses the flags field of
183 * struct blk_zone_report as an input, allowing to get a zone
184 * report using cached zone information if the flag
185 * BLK_ZONE_REP_CACHED is set. In such case, the zone report
186 * may include zones with the condition @BLK_ZONE_COND_ACTIVE
187 * (c.f. the description of this condition above for more
188 * details).
154 * @BLKRESETZONE: Reset the write pointer of the zones in the specified189 * @BLKRESETZONE: Reset the write pointer of the zones in the specified
155 * sector range. The sector range must be zone aligned.190 * sector range. The sector range must be zone aligned.
156 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.191 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.
@@ -169,5 +204,6 @@ struct blk_zone_range { · 12 unmodified lines
169#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range)204#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range)
170#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range)205#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range)
171#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)206#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)
207#define BLKREPORTZONEV2 _IOWR(0x12, 142, struct blk_zone_report)
172 208
173#endif /* _UAPI_BLKZONED_H */209#endif /* _UAPI_BLKZONED_H */
include/uapi/linux/fs.h+2−1
@@ -298,8 +298,9 @@ struct file_attr { · 297 unmodified lines
298#define BLKROTATIONAL _IO(0x12,126)298#define BLKROTATIONAL _IO(0x12,126)
299#define BLKZEROOUT _IO(0x12,127)299#define BLKZEROOUT _IO(0x12,127)
300#define BLKGETDISKSEQ _IOR(0x12,128,__u64)300#define BLKGETDISKSEQ _IOR(0x12,128,__u64)
301/* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */301/* 130-136 and 142 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
302/* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */302/* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */
303#define BLKTRACESETUP2 _IOWR(0x12, 142, struct blk_user_trace_setup2)
303 304
304#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */305#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
305#define FIBMAP _IO(0x00,1) /* bmap access */306#define FIBMAP _IO(0x00,1) /* bmap access */
include/uapi/linux/raid/md_p.h+2−1
@@ -291,7 +291,8 @@ struct mdp_superblock_1 { · 290 unmodified lines
291 __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */291 __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */
292 __le32 sb_csum; /* checksum up to devs[max_dev] */292 __le32 sb_csum; /* checksum up to devs[max_dev] */
293 __le32 max_dev; /* size of devs[] array to consider */293 __le32 max_dev; /* size of devs[] array to consider */
294 __u8 pad3[64-32]; /* set to 0 when writing */294 __le32 logical_block_size; /* same as q->limits->logical_block_size */
295 __u8 pad3[64-36]; /* set to 0 when writing */
295 296
296 /* device state information. Indexed by dev_number.297 /* device state information. Indexed by dev_number.
297 * 2 bytes per device298 * 2 bytes per device

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t