[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 15/25] block: fix FreeBSD build failure with fallocate
From: |
Alex Bennée |
Subject: |
[PATCH v2 15/25] block: fix FreeBSD build failure with fallocate |
Date: |
Tue, 1 Feb 2022 18:20:40 +0000 |
We already use the CONFIG_FALLOCATE_PUNCH_HOLE symbol elsewhere in the
code so use it here.
Fixes: 4ca37a96a7 ("fuse: (Partially) implement fallocate()")
Cc: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
block/export/fuse.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/export/fuse.c b/block/export/fuse.c
index 6710d8aed8..7ed69c4a05 100644
--- a/block/export/fuse.c
+++ b/block/export/fuse.c
@@ -625,6 +625,7 @@ static void fuse_fallocate(fuse_req_t req, fuse_ino_t
inode, int mode,
return;
}
+#ifdef CONFIG_FALLOCATE_PUNCH_HOLE
if (mode & FALLOC_FL_KEEP_SIZE) {
length = MIN(length, blk_len - offset);
}
@@ -643,6 +644,7 @@ static void fuse_fallocate(fuse_req_t req, fuse_ino_t
inode, int mode,
length -= size;
} while (ret == 0 && length > 0);
}
+#endif
#ifdef CONFIG_FALLOCATE_ZERO_RANGE
else if (mode & FALLOC_FL_ZERO_RANGE) {
if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + length > blk_len) {
--
2.30.2
- [PATCH v2 02/25] tests/qtest: enable more vhost-user tests by default, (continued)
- [PATCH v2 02/25] tests/qtest: enable more vhost-user tests by default, Alex Bennée, 2022/02/01
- [PATCH v2 11/25] tests/lcitool: Install libibumad to cover RDMA on Debian based distros, Alex Bennée, 2022/02/01
- [PATCH v2 25/25] plugins: move reset of plugin data to tb_start, Alex Bennée, 2022/02/01
- [PATCH v2 08/25] drop libxml2 checks since libxml is not actually used (for parallels), Alex Bennée, 2022/02/01
- [PATCH v2 12/25] docs/devel: mention our .editorconfig, Alex Bennée, 2022/02/01
- [PATCH v2 09/25] tests/lcitool: Refresh submodule and remove libxml2, Alex Bennée, 2022/02/01
- [PATCH v2 16/25] docs: remove references to TCG tracing, Alex Bennée, 2022/02/01
- [PATCH v2 13/25] gitlab: fall back to commit hash in qemu-setup filename, Alex Bennée, 2022/02/01
- [PATCH v2 07/25] tests/lcitool: Include local qemu.yml when refreshing cirrus-ci files, Alex Bennée, 2022/02/01
- [PATCH v2 15/25] block: fix FreeBSD build failure with fallocate,
Alex Bennée <=
- [PATCH v2 05/25] MAINTAINERS: Cover lcitool submodule with build test / automation, Alex Bennée, 2022/02/01
- [PATCH v2 14/25] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too, Alex Bennée, 2022/02/01
- [PATCH v2 10/25] tests: Manually remove libxml2 on MSYS2 runners, Alex Bennée, 2022/02/01
- [PATCH v2 19/25] tracing: excise the tcg related from tracetool, Alex Bennée, 2022/02/01
- [PATCH v2 21/25] contrib/plugins: add a drcov plugin, Alex Bennée, 2022/02/01
- [PATCH v2 18/25] tracing: remove the trace-tcg includes from the build, Alex Bennée, 2022/02/01
- [PATCH v2 20/25] plugins: add helper functions for coverage plugins, Alex Bennée, 2022/02/01
- [PATCH v2 22/25] tests/plugin: allow libinsn.so per-CPU counts, Alex Bennée, 2022/02/01