um: Add support for DISCARD in the UBD Driver
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>
Wed, 14 Nov 2018 18:41:09 +0000 (18:41 +0000)
committerRichard Weinberger <richard@nod.at>
Thu, 27 Dec 2018 21:48:20 +0000 (22:48 +0100)
commit50109b5a03b4024eb6b8df3ab8f427625f54fe92
tree763dffe32e8a11bf9c6ac69bbf4a45cbc8e1ebff
parenta41421edb926fcc8f212742b2e7a1f21c9047853
um: Add support for DISCARD in the UBD Driver

Support for DISCARD and WRITE_ZEROES in the ubd driver using
fallocate.

DISCARD is enabled by default and can be disabled using a new
UBD command line flag.

If the underlying fs on which the UBD image is stored does not
support DISCARD the support for both DISCARD and WRITE_ZEROES
is turned off.

Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/ubd_kern.c
arch/um/include/shared/os.h
arch/um/os-Linux/file.c