diff options
author | Anton Ivanov <anton.ivanov@cambridgegreys.com> | 2018-11-14 19:41:09 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-12-27 22:48:20 +0100 |
commit | 50109b5a03b4024eb6b8df3ab8f427625f54fe92 (patch) | |
tree | 763dffe32e8a11bf9c6ac69bbf4a45cbc8e1ebff /arch/um/include/shared/os.h | |
parent | um: Remove unsafe printks from the io thread (diff) | |
download | linux-50109b5a03b4024eb6b8df3ab8f427625f54fe92.tar.xz linux-50109b5a03b4024eb6b8df3ab8f427625f54fe92.zip |
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>
Diffstat (limited to 'arch/um/include/shared/os.h')
-rw-r--r-- | arch/um/include/shared/os.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index 048ae37eb5aa..ebf23012a59b 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h @@ -175,6 +175,7 @@ extern int os_fchange_dir(int fd); extern unsigned os_major(unsigned long long dev); extern unsigned os_minor(unsigned long long dev); extern unsigned long long os_makedev(unsigned major, unsigned minor); +extern int os_falloc_punch(int fd, unsigned long long offset, int count); /* start_up.c */ extern void os_early_checks(void); |