History

Merge tag 'for-5.5/block-20191121' of git://git.kernel.dk/linux-block

Pull core block updates from Jens Axboe: "Due to more granular branches, this one is small and will be followed with other core branches that add specific features. I meant to just have a core and drivers branch, but external dependencies we ended up adding a few more that are also core. The changes are: - Fixes and improvements for the zoned device support (Ajay, Damien) - sed-opal table writing and datastore UID (Revanth) - blk-cgroup (and bfq) blk-cgroup stat fixes (Tejun) - Improvements to the block stats tracking (Pavel) - Fix for overruning sysfs buffer for large number of CPUs (Ming) - Optimization for small IO (Ming, Christoph) - Fix typo in RWH lifetime hint (Eugene) - Dead code removal and documentation (Bart) - Reduction in memory usage for queue and tag set (Bart) - Kerneldoc header documentation (André) - Device/partition revalidation fixes (Jan) - Stats tracking for flush requests (Konstantin) - Various other little fixes here and there (et al)" * tag 'for-5.5/block-20191121' of git://git.kernel.dk/linux-block: (48 commits) Revert "block: split bio if the only bvec's length is > SZ_4K" block: add iostat counters for flush requests block,bfq: Skip tracing hooks if possible block: sed-opal: Introduce SUM_SET_LIST parameter and append it using 'add_token_u64' blk-cgroup: cgroup_rstat_updated() shouldn't be called on cgroup1 block: Don't disable interrupts in trigger_softirq() sbitmap: Delete sbitmap_any_bit_clear() blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue() block: split bio if the only bvec's length is > SZ_4K block: still try to split bio if the bvec crosses pages blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT blk-cgroup: reimplement basic IO stats using cgroup rstat blk-cgroup: remove now unused blkg_print_stat_{bytes|ios}_recursive() blk-throtl: stop using blkg->stat_bytes and ->stat_ios bfq-iosched: stop using blkg->stat_bytes and ->stat_ios bfq-iosched: relocate bfqg_*rwstat*() helpers block: add zone open, close and finish ioctl support block: add zone open, close and finish operations block: Simplify REQ_OP_ZONE_RESET_ALL handling block: Remove REQ_OP_ZONE_RESET plugging ...

Linus Torvalds committed 6 years ago

Commit ff6814b2 parents 6e7b06a 1e2791551 files · +1398 −800Browse files

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

Unified · Split

3 files
  1. include/uapi/linux/blkzoned.h +14 −3
  2. include/uapi/linux/fcntl.h +8 −1
  3. include/uapi/linux/sed-opal.h +20 −0
include/uapi/linux/blkzoned.h+14−3
@@ -120,9 +120,11 @@ struct blk_zone_report { · 119 unmodified lines
120120 };
121121
122122 /**
123− * struct blk_zone_range - BLKRESETZONE ioctl request
124− * @sector: starting sector of the first zone to issue reset write pointer
125− * @nr_sectors: Total number of sectors of 1 or more zones to reset
123+ * struct blk_zone_range - BLKRESETZONE/BLKOPENZONE/
124+ * BLKCLOSEZONE/BLKFINISHZONE ioctl
125+ * requests
126+ * @sector: Starting sector of the first zone to operate on.
127+ * @nr_sectors: Total number of sectors of all zones to operate on.
126128 */
127129 struct blk_zone_range {
128130 __u64 sector;
@@ -139,10 +141,19 @@ struct blk_zone_range { · 10 unmodified lines
139141 * sector range. The sector range must be zone aligned.
140142 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.
141143 * @BLKGETNRZONES: Get the total number of zones of the device.
144+ * @BLKOPENZONE: Open the zones in the specified sector range.
145+ * The 512 B sector range must be zone aligned.
146+ * @BLKCLOSEZONE: Close the zones in the specified sector range.
147+ * The 512 B sector range must be zone aligned.
148+ * @BLKFINISHZONE: Mark the zones as full in the specified sector range.
149+ * The 512 B sector range must be zone aligned.
142150 */
143151 #define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report)
144152 #define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range)
145153 #define BLKGETZONESZ _IOR(0x12, 132, __u32)
146154 #define BLKGETNRZONES _IOR(0x12, 133, __u32)
155+#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range)
156+#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range)
157+#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)
147158
148159 #endif /* _UAPI_BLKZONED_H */
include/uapi/linux/fcntl.h+8−1
@@ -58,13 +58,20 @@ · 57 unmodified lines
5858 * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
5959 * used to clear any hints previously set.
6060 */
61−#define RWF_WRITE_LIFE_NOT_SET 0
61+#define RWH_WRITE_LIFE_NOT_SET 0
6262 #define RWH_WRITE_LIFE_NONE 1
6363 #define RWH_WRITE_LIFE_SHORT 2
6464 #define RWH_WRITE_LIFE_MEDIUM 3
6565 #define RWH_WRITE_LIFE_LONG 4
6666 #define RWH_WRITE_LIFE_EXTREME 5
6767
68+/*
69+ * The originally introduced spelling is remained from the first
70+ * versions of the patch set that introduced the feature, see commit
71+ * v4.13-rc1~212^2~51.
72+ */
73+#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
74+
6875 /*
6976 * Types of directory notifications that may be requested.
7077 */
include/uapi/linux/sed-opal.h+20−0
@@ -113,6 +113,25 @@ struct opal_shadow_mbr { · 112 unmodified lines
113113 __u64 size;
114114 };
115115
116+/* Opal table operations */
117+enum opal_table_ops {
118+ OPAL_READ_TABLE,
119+ OPAL_WRITE_TABLE,
120+};
121+
122+#define OPAL_UID_LENGTH 8
123+struct opal_read_write_table {
124+ struct opal_key key;
125+ const __u64 data;
126+ const __u8 table_uid[OPAL_UID_LENGTH];
127+ __u64 offset;
128+ __u64 size;
129+#define OPAL_TABLE_READ (1 << OPAL_READ_TABLE)
130+#define OPAL_TABLE_WRITE (1 << OPAL_WRITE_TABLE)
131+ __u64 flags;
132+ __u64 priv;
133+};
134+
116135 #define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)
117136 #define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock)
118137 #define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key)
@@ -128,5 +147,6 @@ struct opal_shadow_mbr { · 9 unmodified lines
128147 #define IOC_OPAL_PSID_REVERT_TPR _IOW('p', 232, struct opal_key)
129148 #define IOC_OPAL_MBR_DONE _IOW('p', 233, struct opal_mbr_done)
130149 #define IOC_OPAL_WRITE_SHADOW_MBR _IOW('p', 234, struct opal_shadow_mbr)
150+#define IOC_OPAL_GENERIC_TABLE_RW _IOW('p', 235, struct opal_read_write_table)
131151
132152 #endif /* _UAPI_SED_OPAL_H */