[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 013/109] vitriofsd/passthrough_ll: fix fallocate() ifdefs
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PATCH v2 013/109] vitriofsd/passthrough_ll: fix fallocate() ifdefs |
Date: |
Tue, 21 Jan 2020 12:22:57 +0000 |
From: Xiao Yang <address@hidden>
1) Use correct CONFIG_FALLOCATE macro to check if fallocate() is supported.(i.e
configure
script sets CONFIG_FALLOCATE intead of HAVE_FALLOCATE if fallocate() is
supported)
2) Replace HAVE_POSIX_FALLOCATE with CONFIG_POSIX_FALLOCATE.
Signed-off-by: Xiao Yang <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Merged from two of Xiao Yang's patches
---
tools/virtiofsd/passthrough_ll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index e702f7dec6..e1f76170f6 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -974,13 +974,13 @@ static void lo_fallocate(fuse_req_t req, fuse_ino_t ino,
int mode, off_t offset,
int err = EOPNOTSUPP;
(void)ino;
-#ifdef HAVE_FALLOCATE
+#ifdef CONFIG_FALLOCATE
err = fallocate(fi->fh, mode, offset, length);
if (err < 0) {
err = errno;
}
-#elif defined(HAVE_POSIX_FALLOCATE)
+#elif defined(CONFIG_POSIX_FALLOCATE)
if (mode) {
fuse_reply_err(req, EOPNOTSUPP);
return;
--
2.24.1
- Re: [PATCH v2 006/109] virtiofsd: Trim down imported files, (continued)
- [PATCH v2 004/109] virtiofsd: Add fuse_lowlevel.c, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 008/109] virtiofsd: remove mountpoint dummy argument, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 009/109] virtiofsd: remove unused notify reply support, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 010/109] virtiofsd: Fix fuse_daemonize ignored return values, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 011/109] virtiofsd: Fix common header and define for QEMU builds, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 007/109] virtiofsd: Format imported files to qemu style, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 012/109] virtiofsd: Trim out compatibility code, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 013/109] vitriofsd/passthrough_ll: fix fallocate() ifdefs,
Dr. David Alan Gilbert (git) <=
- [PATCH v2 015/109] virtiofsd: Add options for virtio, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 014/109] virtiofsd: Make fsync work even if only inode is passed in, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 016/109] virtiofsd: add -o source=PATH to help output, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 017/109] virtiofsd: Open vhost connection instead of mounting, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 018/109] virtiofsd: Start wiring up vhost-user, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 020/109] virtiofsd: get/set features callbacks, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 019/109] virtiofsd: Add main virtio loop, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 022/109] virtiofsd: Poll kick_fd for queue, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 021/109] virtiofsd: Start queue threads, Dr. David Alan Gilbert (git), 2020/01/21