History

Merge tag 'for-5.8/drivers-2020-06-01' of git://git.kernel.dk/linux-block

Pull block driver updates from Jens Axboe: "On top of the core changes, here are the block driver changes for this merge window: - NVMe changes: - NVMe over Fibre Channel protocol updates, which also reach over to drivers/scsi/lpfc (James Smart) - namespace revalidation support on the target (Anthony Iliopoulos) - gcc zero length array fix (Arnd Bergmann) - nvmet cleanups (Chaitanya Kulkarni) - misc cleanups and fixes (me, Keith Busch, Sagi Grimberg) - use a SRQ per completion vector (Max Gurtovoy) - fix handling of runtime changes to the queue count (Weiping Zhang) - t10 protection information support for nvme-rdma and nvmet-rdma (Israel Rukshin and Max Gurtovoy) - target side AEN improvements (Chaitanya Kulkarni) - various fixes and minor improvements all over, icluding the nvme part of the lpfc driver" - Floppy code cleanup series (Willy, Denis) - Floppy contention fix (Jiri) - Loop CONFIGURE support (Martijn) - bcache fixes/improvements (Coly, Joe, Colin) - q->queuedata cleanups (Christoph) - Get rid of ioctl_by_bdev (Christoph, Stefan) - md/raid5 allocation fixes (Coly) - zero length array fixes (Gustavo) - swim3 task state fix (Xu)" * tag 'for-5.8/drivers-2020-06-01' of git://git.kernel.dk/linux-block: (166 commits) bcache: configure the asynchronous registertion to be experimental bcache: asynchronous devices registration bcache: fix refcount underflow in bcache_device_free() bcache: Convert pr_<level> uses to a more typical style bcache: remove redundant variables i and n lpfc: Fix return value in __lpfc_nvme_ls_abort lpfc: fix axchg pointer reference after free and double frees lpfc: Fix pointer checks and comments in LS receive refactoring nvme: set dma alignment to qword nvmet: cleanups the loop in nvmet_async_events_process nvmet: fix memory leak when removing namespaces and controllers concurrently nvmet-rdma: add metadata/T10-PI support nvmet: add metadata support for block devices nvmet: add metadata/T10-PI support nvme: add Metadata Capabilities enumerations nvmet: rename nvmet_check_data_len to nvmet_check_transfer_len nvmet: rename nvmet_rw_len to nvmet_rw_data_len nvmet: add metadata characteristics for a namespace nvme-rdma: add metadata/T10-PI support nvme-rdma: introduce nvme_rdma_sgl structure ...

Linus Torvalds committed 6 years ago

Commit bce159d2 parents 750a02a 0c8d3fc81 files · +5429 −2353Browse files

Showing the changes to include/uapi/linux (3 of 81 files). Show all

Unified · Split

3 files
  1. include/uapi/linux/fd.h +22 −4
  2. include/uapi/linux/fdreg.h +13 −3
  3. include/uapi/linux/loop.h +29 −2
include/uapi/linux/fd.h+22−4
@@ -172,7 +172,10 @@ struct floppy_drive_params { · 171 unmodified lines
172172 * used in succession to try to read the disk. If the FDC cannot lock onto
173173 * the disk, the next format is tried. This uses the variable 'probing'.
174174 */
175− short autodetect[8]; /* autodetected formats */
175+
176+#define FD_AUTODETECT_SIZE 8
177+
178+ short autodetect[FD_AUTODETECT_SIZE]; /* autodetected formats */
176179
177180 int checkfreq; /* how often should the drive be checked for disk
178181 * changes */
@@ -357,10 +360,25 @@ struct floppy_raw_cmd { · 178 unmodified lines
357360 int buffer_length; /* length of allocated buffer */
358361
359362 unsigned char rate;
363+
364+#define FD_RAW_CMD_SIZE 16
365+#define FD_RAW_REPLY_SIZE 16
366+#define FD_RAW_CMD_FULLSIZE (FD_RAW_CMD_SIZE + 1 + FD_RAW_REPLY_SIZE)
367+
368+ /* The command may take up the space initially intended for the reply
369+ * and the reply count. Needed for long 82078 commands such as RESTORE,
370+ * which takes 17 command bytes.
371+ */
372+
360373 unsigned char cmd_count;
361− unsigned char cmd[16];
362− unsigned char reply_count;
363− unsigned char reply[16];
374+ union {
375+ struct {
376+ unsigned char cmd[FD_RAW_CMD_SIZE];
377+ unsigned char reply_count;
378+ unsigned char reply[FD_RAW_REPLY_SIZE];
379+ };
380+ unsigned char fullcmd[FD_RAW_CMD_FULLSIZE];
381+ };
364382 int track;
365383 int resultcode;
366384
include/uapi/linux/fdreg.h+13−3
@@ -7,13 +7,23 @@ · 6 unmodified lines
77 * Handbook", Sanches and Canton.
88 */
99
10−/* Fd controller regs. S&C, about page 340 */
11−#define FD_STATUS 4
12−#define FD_DATA 5
10+/* 82077's auxiliary status registers A & B (R) */
11+#define FD_SRA 0
12+#define FD_SRB 1
1313
1414 /* Digital Output Register */
1515 #define FD_DOR 2
1616
17+/* 82077's tape drive register (R/W) */
18+#define FD_TDR 3
19+
20+/* 82077's data rate select register (W) */
21+#define FD_DSR 4
22+
23+/* Fd controller regs. S&C, about page 340 */
24+#define FD_STATUS 4
25+#define FD_DATA 5
26+
1727 /* Digital Input Register (read) */
1828 #define FD_DIR 7
1929
include/uapi/linux/loop.h+29−2
@@ -25,6 +25,16 @@ enum { · 24 unmodified lines
2525 LO_FLAGS_DIRECT_IO = 16,
2626 };
2727
28+/* LO_FLAGS that can be set using LOOP_SET_STATUS(64) */
29+#define LOOP_SET_STATUS_SETTABLE_FLAGS (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN)
30+
31+/* LO_FLAGS that can be cleared using LOOP_SET_STATUS(64) */
32+#define LOOP_SET_STATUS_CLEARABLE_FLAGS (LO_FLAGS_AUTOCLEAR)
33+
34+/* LO_FLAGS that can be set using LOOP_CONFIGURE */
35+#define LOOP_CONFIGURE_SETTABLE_FLAGS (LO_FLAGS_READ_ONLY | LO_FLAGS_AUTOCLEAR \
36+ | LO_FLAGS_PARTSCAN | LO_FLAGS_DIRECT_IO)
37+
2838 #include <asm/posix_types.h> /* for __kernel_old_dev_t */
2939 #include <linux/types.h> /* for __u64 */
3040
@@ -37,7 +47,7 @@ struct loop_info { · 6 unmodified lines
3747 int lo_offset;
3848 int lo_encrypt_type;
3949 int lo_encrypt_key_size; /* ioctl w/o */
40− int lo_flags; /* ioctl r/o */
50+ int lo_flags;
4151 char lo_name[LO_NAME_SIZE];
4252 unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
4353 unsigned long lo_init[2];
@@ -53,13 +63,29 @@ struct loop_info64 { · 9 unmodified lines
5363 __u32 lo_number; /* ioctl r/o */
5464 __u32 lo_encrypt_type;
5565 __u32 lo_encrypt_key_size; /* ioctl w/o */
56− __u32 lo_flags; /* ioctl r/o */
66+ __u32 lo_flags;
5767 __u8 lo_file_name[LO_NAME_SIZE];
5868 __u8 lo_crypt_name[LO_NAME_SIZE];
5969 __u8 lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
6070 __u64 lo_init[2];
6171 };
6272
73+/**
74+ * struct loop_config - Complete configuration for a loop device.
75+ * @fd: fd of the file to be used as a backing file for the loop device.
76+ * @block_size: block size to use; ignored if 0.
77+ * @info: struct loop_info64 to configure the loop device with.
78+ *
79+ * This structure is used with the LOOP_CONFIGURE ioctl, and can be used to
80+ * atomically setup and configure all loop device parameters at once.
81+ */
82+struct loop_config {
83+ __u32 fd;
84+ __u32 block_size;
85+ struct loop_info64 info;
86+ __u64 __reserved[8];
87+};
88+
6389 /*
6490 * Loop filter types
6591 */
@@ -90,6 +116,7 @@ struct loop_info64 { · 24 unmodified lines
90116 #define LOOP_SET_CAPACITY 0x4C07
91117 #define LOOP_SET_DIRECT_IO 0x4C08
92118 #define LOOP_SET_BLOCK_SIZE 0x4C09
119+#define LOOP_CONFIGURE 0x4C0A
93120
94121 /* /dev/loop-control interface */
95122 #define LOOP_CTL_ADD 0x4C80