hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/s390/include/uapi/asm/dasd.h
....@@ -1,5 +1,5 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
-/*
2
+/*
33 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
44 * Bugreports.to..: <Linux390@de.ibm.com>
55 * Copyright IBM Corp. 1999, 2000
....@@ -21,40 +21,40 @@
2121
2222 #define DASD_API_VERSION 6
2323
24
-/*
24
+/*
2525 * struct dasd_information2_t
2626 * represents any data about the device, which is visible to userspace.
2727 * including foramt and featueres.
2828 */
2929 typedef struct dasd_information2_t {
30
- unsigned int devno; /* S/390 devno */
31
- unsigned int real_devno; /* for aliases */
32
- unsigned int schid; /* S/390 subchannel identifier */
33
- unsigned int cu_type : 16; /* from SenseID */
34
- unsigned int cu_model : 8; /* from SenseID */
35
- unsigned int dev_type : 16; /* from SenseID */
36
- unsigned int dev_model : 8; /* from SenseID */
37
- unsigned int open_count;
38
- unsigned int req_queue_len;
39
- unsigned int chanq_len; /* length of chanq */
40
- char type[4]; /* from discipline.name, 'none' for unknown */
41
- unsigned int status; /* current device level */
42
- unsigned int label_block; /* where to find the VOLSER */
43
- unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
44
- unsigned int characteristics_size;
45
- unsigned int confdata_size;
46
- char characteristics[64]; /* from read_device_characteristics */
47
- char configuration_data[256]; /* from read_configuration_data */
48
- unsigned int format; /* format info like formatted/cdl/ldl/... */
49
- unsigned int features; /* dasd features like 'ro',... */
50
- unsigned int reserved0; /* reserved for further use ,... */
51
- unsigned int reserved1; /* reserved for further use ,... */
52
- unsigned int reserved2; /* reserved for further use ,... */
53
- unsigned int reserved3; /* reserved for further use ,... */
54
- unsigned int reserved4; /* reserved for further use ,... */
55
- unsigned int reserved5; /* reserved for further use ,... */
56
- unsigned int reserved6; /* reserved for further use ,... */
57
- unsigned int reserved7; /* reserved for further use ,... */
30
+ unsigned int devno; /* S/390 devno */
31
+ unsigned int real_devno; /* for aliases */
32
+ unsigned int schid; /* S/390 subchannel identifier */
33
+ unsigned int cu_type : 16; /* from SenseID */
34
+ unsigned int cu_model : 8; /* from SenseID */
35
+ unsigned int dev_type : 16; /* from SenseID */
36
+ unsigned int dev_model : 8; /* from SenseID */
37
+ unsigned int open_count;
38
+ unsigned int req_queue_len;
39
+ unsigned int chanq_len; /* length of chanq */
40
+ char type[4]; /* from discipline.name, 'none' for unknown */
41
+ unsigned int status; /* current device level */
42
+ unsigned int label_block; /* where to find the VOLSER */
43
+ unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
44
+ unsigned int characteristics_size;
45
+ unsigned int confdata_size;
46
+ char characteristics[64]; /* from read_device_characteristics */
47
+ char configuration_data[256]; /* from read_configuration_data */
48
+ unsigned int format; /* format info like formatted/cdl/ldl/... */
49
+ unsigned int features; /* dasd features like 'ro',... */
50
+ unsigned int reserved0; /* reserved for further use ,... */
51
+ unsigned int reserved1; /* reserved for further use ,... */
52
+ unsigned int reserved2; /* reserved for further use ,... */
53
+ unsigned int reserved3; /* reserved for further use ,... */
54
+ unsigned int reserved4; /* reserved for further use ,... */
55
+ unsigned int reserved5; /* reserved for further use ,... */
56
+ unsigned int reserved6; /* reserved for further use ,... */
57
+ unsigned int reserved7; /* reserved for further use ,... */
5858 } dasd_information2_t;
5959
6060 /*
....@@ -92,34 +92,34 @@
9292
9393 #define DASD_PARTN_BITS 2
9494
95
-/*
95
+/*
9696 * struct dasd_information_t
9797 * represents any data about the data, which is visible to userspace
9898 */
9999 typedef struct dasd_information_t {
100
- unsigned int devno; /* S/390 devno */
101
- unsigned int real_devno; /* for aliases */
102
- unsigned int schid; /* S/390 subchannel identifier */
103
- unsigned int cu_type : 16; /* from SenseID */
104
- unsigned int cu_model : 8; /* from SenseID */
105
- unsigned int dev_type : 16; /* from SenseID */
106
- unsigned int dev_model : 8; /* from SenseID */
107
- unsigned int open_count;
108
- unsigned int req_queue_len;
109
- unsigned int chanq_len; /* length of chanq */
110
- char type[4]; /* from discipline.name, 'none' for unknown */
111
- unsigned int status; /* current device level */
112
- unsigned int label_block; /* where to find the VOLSER */
113
- unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
114
- unsigned int characteristics_size;
115
- unsigned int confdata_size;
116
- char characteristics[64]; /* from read_device_characteristics */
117
- char configuration_data[256]; /* from read_configuration_data */
100
+ unsigned int devno; /* S/390 devno */
101
+ unsigned int real_devno; /* for aliases */
102
+ unsigned int schid; /* S/390 subchannel identifier */
103
+ unsigned int cu_type : 16; /* from SenseID */
104
+ unsigned int cu_model : 8; /* from SenseID */
105
+ unsigned int dev_type : 16; /* from SenseID */
106
+ unsigned int dev_model : 8; /* from SenseID */
107
+ unsigned int open_count;
108
+ unsigned int req_queue_len;
109
+ unsigned int chanq_len; /* length of chanq */
110
+ char type[4]; /* from discipline.name, 'none' for unknown */
111
+ unsigned int status; /* current device level */
112
+ unsigned int label_block; /* where to find the VOLSER */
113
+ unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
114
+ unsigned int characteristics_size;
115
+ unsigned int confdata_size;
116
+ char characteristics[64]; /* from read_device_characteristics */
117
+ char configuration_data[256]; /* from read_configuration_data */
118118 } dasd_information_t;
119119
120120 /*
121121 * Read Subsystem Data - Performance Statistics
122
- */
122
+ */
123123 typedef struct dasd_rssd_perf_stats_t {
124124 unsigned char invalid:1;
125125 unsigned char format:3;
....@@ -154,21 +154,21 @@
154154 unsigned char reseved2[96];
155155 } __attribute__((packed)) dasd_rssd_perf_stats_t;
156156
157
-/*
157
+/*
158158 * struct profile_info_t
159
- * holds the profinling information
159
+ * holds the profinling information
160160 */
161161 typedef struct dasd_profile_info_t {
162
- unsigned int dasd_io_reqs; /* number of requests processed at all */
163
- unsigned int dasd_io_sects; /* number of sectors processed at all */
164
- unsigned int dasd_io_secs[32]; /* histogram of request's sizes */
165
- unsigned int dasd_io_times[32]; /* histogram of requests's times */
166
- unsigned int dasd_io_timps[32]; /* histogram of requests's times per sector */
167
- unsigned int dasd_io_time1[32]; /* histogram of time from build to start */
168
- unsigned int dasd_io_time2[32]; /* histogram of time from start to irq */
169
- unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
170
- unsigned int dasd_io_time3[32]; /* histogram of time from irq to end */
171
- unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
162
+ unsigned int dasd_io_reqs; /* number of requests processed at all */
163
+ unsigned int dasd_io_sects; /* number of sectors processed at all */
164
+ unsigned int dasd_io_secs[32]; /* histogram of request's sizes */
165
+ unsigned int dasd_io_times[32]; /* histogram of requests's times */
166
+ unsigned int dasd_io_timps[32]; /* histogram of requests's times per sector */
167
+ unsigned int dasd_io_time1[32]; /* histogram of time from build to start */
168
+ unsigned int dasd_io_time2[32]; /* histogram of time from start to irq */
169
+ unsigned int dasd_io_time2ps[32]; /* histogram of time from start to irq */
170
+ unsigned int dasd_io_time3[32]; /* histogram of time from irq to end */
171
+ unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
172172 } dasd_profile_info_t;
173173
174174 /*
....@@ -189,10 +189,12 @@
189189 * 3/11: also write home address
190190 * 4/12: invalidate track
191191 */
192
-#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
193
-#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
194
-#define DASD_FMT_INT_INVAL 4 /* invalidate tracks */
195
-#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
192
+#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
193
+#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
194
+#define DASD_FMT_INT_INVAL 4 /* invalidate tracks */
195
+#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
196
+#define DASD_FMT_INT_FMT_NOR0 16 /* remove permission to write record zero */
197
+#define DASD_FMT_INT_ESE_FULL 32 /* release space for entire volume */
196198
197199 /*
198200 * struct format_check_t
....@@ -225,7 +227,7 @@
225227 /* If key-length was != 0 */
226228 #define DASD_FMT_ERR_KEY_LENGTH 5
227229
228
-/*
230
+/*
229231 * struct attrib_data_t
230232 * represents the operation (cache) bits for the device.
231233 * Used in DE to influence caching of the DASD.
....@@ -281,13 +283,13 @@
281283 * Here ist how the ioctl-nr should be used:
282284 * 0 - 31 DASD driver itself
283285 * 32 - 239 still open
284
- * 240 - 255 reserved for EMC
286
+ * 240 - 255 reserved for EMC
285287 *******************************************************************************/
286288
287289 /* Disable the volume (for Linux) */
288
-#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
290
+#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
289291 /* Enable the volume (for Linux) */
290
-#define BIODASDENABLE _IO(DASD_IOCTL_LETTER,1)
292
+#define BIODASDENABLE _IO(DASD_IOCTL_LETTER,1)
291293 /* Issue a reserve/release command, rsp. */
292294 #define BIODASDRSRV _IO(DASD_IOCTL_LETTER,2) /* reserve */
293295 #define BIODASDRLSE _IO(DASD_IOCTL_LETTER,3) /* release */
....@@ -295,9 +297,9 @@
295297 /* reset profiling information of a device */
296298 #define BIODASDPRRST _IO(DASD_IOCTL_LETTER,5)
297299 /* Quiesce IO on device */
298
-#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6)
300
+#define BIODASDQUIESCE _IO(DASD_IOCTL_LETTER,6)
299301 /* Resume IO on device */
300
-#define BIODASDRESUME _IO(DASD_IOCTL_LETTER,7)
302
+#define BIODASDRESUME _IO(DASD_IOCTL_LETTER,7)
301303 /* Abort all I/O on a device */
302304 #define BIODASDABORTIO _IO(DASD_IOCTL_LETTER, 240)
303305 /* Allow I/O on a device */
....@@ -315,13 +317,15 @@
315317 /* Performance Statistics Read */
316318 #define BIODASDPSRD _IOR(DASD_IOCTL_LETTER,4,dasd_rssd_perf_stats_t)
317319 /* Get Attributes (cache operations) */
318
-#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t)
320
+#define BIODASDGATTR _IOR(DASD_IOCTL_LETTER,5,attrib_data_t)
319321
320322
321323 /* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
322
-#define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t)
324
+#define BIODASDFMT _IOW(DASD_IOCTL_LETTER,1,format_data_t)
323325 /* Set Attributes (cache operations) */
324
-#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
326
+#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)
327
+/* Release Allocated Space */
328
+#define BIODASDRAS _IOW(DASD_IOCTL_LETTER, 3, format_data_t)
325329
326330 /* Get Sense Path Group ID (SNID) data */
327331 #define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data)