diff options
author | Jan Höppner <hoeppner@linux.ibm.com> | 2018-05-29 17:58:03 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-07-11 21:39:53 +0300 |
commit | c729696bcf8b23450043dd9c9972c15e53419ae4 (patch) | |
tree | b876a48481eebb13e3c8f192c08651de68184ba7 /drivers/s390/block/dasd_eckd.h | |
parent | 461db0ea03755e0eeb7186f8613ba2291dff7833 (diff) | |
download | linux-c729696bcf8b23450043dd9c9972c15e53419ae4.tar.xz |
s390/dasd: Recognise data for ESE volumes
In order to work with Extent Space Efficient (ESE) volumes, certain
viable information about those volumes and the corresponding extent
pool (such as extent size, configured space, allocated space, etc.) can
be provided.
Use the CCW commands Volume Storage Query and Logical Configuration
Query to receive detailed information about ESE volumes and the extent
pool respectively. These information are made accessible via internal
functions for subsequent users, and via sysfs attributes for userpsace
usage.
The new sysfs attributes reside in separate directories called capacity
and extent_pool.
attributes:
ese:
0/1 depending on whether the volume is an ESE volume
Capacity related attributes:
space_allocated:
Space currently allocated by the volume (in cyl)
space_configured:
Remaining space in the extent pool (in cyl)
logical_capacity:
The entire addressable space for this volume (in cyl)
Extent Pool related attributes:
pool_id:
ID of the extent pool the volume in question resides in
pool_oos:
Extent pool is out-of-space
extent_size:
Size of a single extent in this pool
cap_at_warnlevel
Extent pool capacity at warn level
warn_threshold:
Threshold at which percentage of remaining extent pool space a
warning message is issued
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_eckd.h')
-rw-r--r-- | drivers/s390/block/dasd_eckd.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_eckd.h b/drivers/s390/block/dasd_eckd.h index 8cd4768edb94..bc5998068ddf 100644 --- a/drivers/s390/block/dasd_eckd.h +++ b/drivers/s390/block/dasd_eckd.h @@ -62,6 +62,8 @@ * Perform Subsystem Function / Sub-Orders */ #define PSF_SUBORDER_QHA 0x1C /* Query Host Access */ +#define PSF_SUBORDER_VSQ 0x52 /* Volume Storage Query */ +#define PSF_SUBORDER_LCQ 0x53 /* Logical Configuration Query */ /* * CUIR response condition codes @@ -368,6 +370,75 @@ struct dasd_rssd_messages { char messages[4087]; } __packed; +/* + * Read Subsystem Data - Volume Storage Query + */ +struct dasd_rssd_vsq { + struct { + __u8 tse:1; + __u8 space_not_available:1; + __u8 ese:1; + __u8 unused:5; + } __packed vol_info; + __u8 unused1; + __u16 extent_pool_id; + __u8 warn_cap_limit; + __u8 warn_cap_guaranteed; + __u16 unused2; + __u32 limit_capacity; + __u32 guaranteed_capacity; + __u32 space_allocated; + __u32 space_configured; + __u32 logical_capacity; +} __packed; + +/* + * Extent Pool Summary + */ +struct dasd_ext_pool_sum { + __u16 pool_id; + __u8 repo_warn_thrshld; + __u8 warn_thrshld; + struct { + __u8 type:1; /* 0 - CKD / 1 - FB */ + __u8 track_space_efficient:1; + __u8 extent_space_efficient:1; + __u8 standard_volume:1; + __u8 extent_size_valid:1; + __u8 capacity_at_warnlevel:1; + __u8 pool_oos:1; + __u8 unused0:1; + __u8 unused1; + } __packed flags; + struct { + __u8 reserved0:1; + __u8 size_1G:1; + __u8 reserved1:5; + __u8 size_16M:1; + } __packed extent_size; + __u8 unused; +} __packed; + +/* + * Read Subsystem Data-Response - Logical Configuration Query - Header + */ +struct dasd_rssd_lcq { + __u16 data_length; /* Length of data returned */ + __u16 pool_count; /* Count of extent pools returned - Max: 448 */ + struct { + __u8 pool_info_valid:1; /* Detailed Information valid */ + __u8 pool_id_volume:1; + __u8 pool_id_cec:1; + __u8 unused0:5; + __u8 unused1; + } __packed header_flags; + char sfi_type[6]; /* Storage Facility Image Type (EBCDIC) */ + char sfi_model[3]; /* Storage Facility Image Model (EBCDIC) */ + __u8 sfi_seq_num[10]; /* Storage Facility Image Sequence Number */ + __u8 reserved[7]; + struct dasd_ext_pool_sum ext_pool_sum[448]; +} __packed; + struct dasd_cuir_message { __u16 length; __u8 format; @@ -532,6 +603,8 @@ struct dasd_eckd_private { int uses_cdl; struct attrib_data_t attrib; /* e.g. cache operations */ struct dasd_rssd_features features; + struct dasd_rssd_vsq vsq; + struct dasd_ext_pool_sum eps; u32 real_cyl; /* alias managemnet */ |