All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] s390/dasd: Restrict discard support to virtual DASD devices
@ 2026-07-22 15:16 Volkan Unal
  2026-07-22 15:16 ` [PATCH 1/3] s390/dasd: Add device type defines for FBA devices Volkan Unal
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Volkan Unal @ 2026-07-22 15:16 UTC (permalink / raw)
  To: linux-s390; +Cc: oberpar, sth, hoeppner, meted

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) dasdd1


After 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(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-22 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 15:16 [PATCH 0/3] s390/dasd: Restrict discard support to virtual DASD devices Volkan Unal
2026-07-22 15:16 ` [PATCH 1/3] s390/dasd: Add device type defines for FBA devices Volkan Unal
2026-07-22 15:20   ` sashiko-bot
2026-07-22 15:16 ` [PATCH 2/3] s390/dasd: Restrict discard support to virtual DASD devices Volkan Unal
2026-07-22 15:33   ` sashiko-bot
2026-07-22 15:16 ` [PATCH 3/3] s390/dasd: Make FBA discard support conditional per device Volkan Unal
2026-07-22 15:38   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.