s390/dasd: Add discard support for FBA devices
authorJan Höppner <hoeppner@linux.vnet.ibm.com>
Thu, 30 Jun 2016 11:28:57 +0000 (13:28 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 29 Aug 2017 14:31:26 +0000 (16:31 +0200)
commit28b841b3a7cb07a4bfd436a15b31bc88509dcf9a
treeb73ad19e32e2be733c51419b7b859f7e900b4ced
parent8b94dd9e0d4439f83fcc55f1f8020c86e79b623d
s390/dasd: Add discard support for FBA devices

The z/VM hypervisor provides virtual disks (VDISK) which are backed by
main memory of the hypervisor. Those devices are seen as DASD FBA disks
within the Linux guest.

Whenever data is written to such a device, memory is allocated
on-the-fly by z/VM accordingly. This memory, however, is not being freed
if data on the device is deleted by the guest OS.

In order to make memory usable after deletion again, add discard support
to the FBA discipline.

While at it, update comments regarding the DASD_FEATURE_* flags.

Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/uapi/asm/dasd.h
drivers/s390/block/dasd.c
drivers/s390/block/dasd_devmap.c
drivers/s390/block/dasd_fba.c
drivers/s390/block/dasd_int.h