um: Fix WRITE_ZEROES in the UBD Driver
authorFrédéric Danis <frederic.danis@collabora.com>
Tue, 25 Jan 2022 17:14:05 +0000 (18:14 +0100)
committerRichard Weinberger <richard@nod.at>
Fri, 11 Mar 2022 09:46:34 +0000 (10:46 +0100)
commitd2a0a616ab2246aab9527eeacf86a033679c8b22
treef20757bf5efbfacc01c905f417b35fadc9eaf9fe
parentb35507a4cfb26b7fcc0c97de6367828d5902bbba
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>
arch/um/drivers/ubd_kern.c
arch/um/include/shared/os.h
arch/um/os-Linux/file.c