aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorFrédéric Danis <frederic.danis@collabora.com>2022-01-25 18:14:05 +0100
committerRichard Weinberger <richard@nod.at>2022-03-11 10:46:34 +0100
commitd2a0a616ab2246aab9527eeacf86a033679c8b22 (patch)
treef20757bf5efbfacc01c905f417b35fadc9eaf9fe /arch/um/include
parentum: Migrate vector drivers to NAPI (diff)
downloadlinux-dev-d2a0a616ab2246aab9527eeacf86a033679c8b22.tar.xz
linux-dev-d2a0a616ab2246aab9527eeacf86a033679c8b22.zip
um: Fix WRITE_ZEROES in the UBD Driver
Call to fallocate with FALLOC_FL_PUNCH_HOLE on a device backed by a sparse file can end up by missing data, zeroes data range, if the underlying file is used with a tool like bmaptool which will referenced only used spaces. Signed-off-by: Frédéric Danis <frederic.danis@collabora.com> Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/shared/os.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h
index 00214059d9ec..fafde1d5416e 100644
--- a/arch/um/include/shared/os.h
+++ b/arch/um/include/shared/os.h
@@ -168,6 +168,7 @@ 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);
+extern int os_falloc_zeroes(int fd, unsigned long long offset, int count);
extern int os_eventfd(unsigned int initval, int flags);
extern int os_sendmsg_fds(int fd, const void *buf, unsigned int len,
const int *fds, unsigned int fds_num);