s390/dasd: Restrict discard support to virtual DASD devices
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | s390/dasd: Add device type defines for FBA devicesdrivers/ | +7 | 0 replies | |
| 2/3 | s390/dasd: Restrict discard support to virtual DASD devicesdrivers/ | +8 | 0 replies | |
| 3/3 | s390/dasd: Make FBA discard support conditional per devicedrivers/ drivers/ drivers/ | +1 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Stefan Haberland | Jan Höppner | Peter Oberparleiter | Mete Durlu |
|---|---|---|---|---|
| 1/3 | R-b | R-b | R-b | R-b |
| 2/3 | R-b | R-b | R-b | R-b |
| 3/3 | R-b | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/3] s390/dasd: Restrict discard support to virtual DASD devices
The current implementation enables discard support for all FBA DASD disk without checking whether device is virtual (memory-backed) or physical disk.
Background:
The discard implementation for FBA DASD was designed to leverage z/VM's discard behavior for virtual FBA disks (VFBA, CU 6310):
- VDISK -> discard causes page release
- EDEV (SCSI/NVMe) -> discard causes zero-write
- Physical FBA Disk -> discard not supported
Discard behavior for Physical FBA should be consistent with ECKD disks. In particular, discard should remain disabled for Physical FBA, just as it is for ECKD. This change is not intended to affect the behavior of virtual FBA disks.
Ex :
Before changeset (where dasdd is physical FBA DASD) #cat /sys/block/dasdd/queue/discard_max_bytes 33550336
#blkdiscard -f -o 1048576 -l 1048576 /dev/dasdd
blkdiscard: Operation forced, data will be lost!
blkdiscard: BLKDISCARD: /dev/dasdd ioctl failed: Input/output error
#dmesg
[ 271.893040] crw_info : CRW reports slct=0, oflw=0, chn=0, rsc=3, anc=1, erc=4, rsid=18
[ 567.513852] crw_info : CRW reports slct=0, oflw=0, chn=0, rsc=3, anc=1, erc=4, rsid=19
[ 621.254231] ctcm: CTCM driver initialized
[ 621.313130] dasd-fba 0.0.9901: New FBA DASD 3370/04 (CU 3880/01) with 20480 MB and 512 B/blk
[ 621.314748] dasdd:(nonl) dasdd1
[ 825.958866] 0.0.9901: default ERP has run out of retries and failed
[ 825.958882] dasd-fba 0.0.9901: I/O status report:
in req: 00000000fed88110 CS: 0x00 DS: 0x0E
Failing CCW: 00000000005a5fe0
Sense(hex) 0- 7: 80 00 00 00 01 ff ff 03
Sense(hex) 8-15: 00 00 00 00 00 00 00 04
Sense(hex) 16-23: e8 68 01 41 ff 99 0f 03
Sense(hex) 24-31: 00 00 40 e2 00 00 00 00
[ 825.958888] dasd-fba 0.0.9901: Related CP in req: 00000000fed88110
CCW 00000000005a5fc8: 63400010 005A5FE0 DAT: 00000200 00000800 00000000 000007FF
CCW 00000000005a5fd0: 43400008 005A5FF0 DAT: 05000800 00000000
CCW 00000000005a5fd8: 41200000 00000000 DAT:
[ 825.958894] I/O error, dev dasdd, sector 2048 op 0x3:(DISCARD) flags 0x800 phys_seg 1 prio class 2
[ 825.961798] dasdd:(nonl) dasdd1After changeset:
#cat /sys/block/dasdc/queue/discard_max_bytes
0
#blkdiscard -f -o 1048576 -l 1048576 /dev/dasdc ((where dasdc is physical FBA DASD))
blkdiscard: Operation forced, data will be lost!
blkdiscard: BLKDISCARD: /dev/dasdc ioctl failed: Operation not supported
Volkan Unal (3):
s390/dasd: Add device type defines for FBA devices s390/dasd: Restrict discard support to virtual DASD devices s390/dasd: Make FBA discard support conditional per device
drivers/s390/block/dasd.c | 2 +- drivers/s390/block/dasd_fba.c | 20 +++++++++++++++----- drivers/s390/block/dasd_int.h | 1 - 3 files changed, 16 insertions(+), 7 deletions(-)
Signature · 1 line
2.55.0