From 6eadef77a349127a013f22f58518a6bf7852d4f5 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 12 Nov 2019 14:02:16 -0800 Subject: sys_util: add WriteZeroesAt trait Add a variant of WriteZeroes that allows the caller to specify the offset explicitly instead of using the file's cursor. This gets rid of one of the last bits of shared state between disk file users, which will help in implementing multi-queue support. Additionally, modify the WriteZeroes trait to use a generic implementation based on WriteZeroesAt + Seek when possible. BUG=chromium:858815 TEST=Boot Termina in crosvm Change-Id: If710159771aeeb55f4f7746dd4354b6c042144e8 Signed-off-by: Daniel Verkamp Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1913519 --- seccomp/arm/block_device.policy | 2 ++ 1 file changed, 2 insertions(+) (limited to 'seccomp/arm/block_device.policy') diff --git a/seccomp/arm/block_device.policy b/seccomp/arm/block_device.policy index 1ec4053..fad0cc0 100644 --- a/seccomp/arm/block_device.policy +++ b/seccomp/arm/block_device.policy @@ -10,7 +10,9 @@ fstat64: 1 fsync: 1 ftruncate64: 1 _llseek: 1 +pread64: 1 preadv: 1 +pwrite64: 1 pwritev: 1 timerfd_create: 1 timerfd_gettime: 1 -- cgit 1.4.1