[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/30] virtiofsd: fuse: Make iov_length usable outside fuse_lowle
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PATCH 11/30] virtiofsd: fuse: Make iov_length usable outside fuse_lowlevel.c |
Date: |
Mon, 21 Oct 2019 11:58:13 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
contrib/virtiofsd/fuse_lowlevel.c | 2 +-
contrib/virtiofsd/fuse_lowlevel.h | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/contrib/virtiofsd/fuse_lowlevel.c
b/contrib/virtiofsd/fuse_lowlevel.c
index 5ea113ab49..ff68ec0c9d 100644
--- a/contrib/virtiofsd/fuse_lowlevel.c
+++ b/contrib/virtiofsd/fuse_lowlevel.c
@@ -74,7 +74,7 @@ static void convert_attr(const struct fuse_setattr_in *attr,
struct stat *stbuf)
ST_CTIM_NSEC_SET(stbuf, attr->ctimensec);
}
-static size_t iov_length(const struct iovec *iov, size_t count)
+size_t iov_length(const struct iovec *iov, size_t count)
{
size_t seg;
size_t ret = 0;
diff --git a/contrib/virtiofsd/fuse_lowlevel.h
b/contrib/virtiofsd/fuse_lowlevel.h
index 018e7c0be0..84379a4761 100644
--- a/contrib/virtiofsd/fuse_lowlevel.h
+++ b/contrib/virtiofsd/fuse_lowlevel.h
@@ -2000,6 +2000,15 @@ void fuse_session_process_buf(struct fuse_session *se,
*/
int fuse_session_receive_buf(struct fuse_session *se, struct fuse_buf *buf);
+/**
+ * General utility to get the length of an iov, not Fuse specific
+ *
+ * @param iov The iovec to get the length of
+ * @param count Number of entries in the iovec
+ * @return the total length of iov in bytes
+ */
+size_t iov_length(const struct iovec *iov, size_t count);
+
#ifdef __cplusplus
}
#endif
--
2.23.0
- [PATCH 02/30] virtiofsd: Pull in kernel's fuse.h, (continued)
- [PATCH 02/30] virtiofsd: Pull in kernel's fuse.h, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 03/30] virtiofsd: Add auxiliary .c's, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 04/30] virtiofsd: Add fuse_lowlevel.c, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 01/30] virtiofsd: Pull in upstream headers, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 05/30] virtiofsd: Add passthrough_ll, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 07/30] virtiofsd: remove mountpoint dummy argument, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 06/30] virtiofsd: Trim down imported files, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 09/30] virtiofsd: Fix fuse_daemonize ignored return values, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 08/30] virtiofsd: remove unused notify reply support, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 10/30] virtiofsd: Fix common header and define for QEMU builds, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 11/30] virtiofsd: fuse: Make iov_length usable outside fuse_lowlevel.c,
Dr. David Alan Gilbert (git) <=
- [PATCH 12/30] virtiofsd: Make fsync work even if only inode is passed in, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 14/30] virtiofsd: add -o source=PATH to help output, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 13/30] virtiofsd: Add options for virtio, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 15/30] virtiofsd: Open vhost connection instead of mounting, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 16/30] virtiofsd: Start wiring up vhost-user, Dr. David Alan Gilbert (git), 2019/10/21
- [PATCH 17/30] virtiofsd: Add main virtio loop, Dr. David Alan Gilbert (git), 2019/10/21