From: Miklos Szeredi <mszeredi@redhat.com>
To: linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/5] fuse: add STATX request
Date: Thu, 10 Aug 2023 12:54:58 +0200 [thread overview]
Message-ID: <20230810105501.1418427-3-mszeredi@redhat.com> (raw)
In-Reply-To: <20230810105501.1418427-1-mszeredi@redhat.com>
Use the same structure as statx.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
include/uapi/linux/fuse.h | 56 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index b3fcab13fcd3..fe700b91b33b 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -207,6 +207,9 @@
* - add FUSE_EXT_GROUPS
* - add FUSE_CREATE_SUPP_GROUP
* - add FUSE_HAS_EXPIRE_ONLY
+ *
+ * 7.39
+ * - add FUSE_STATX and related structures
*/
#ifndef _LINUX_FUSE_H
@@ -242,7 +245,7 @@
#define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 38
+#define FUSE_KERNEL_MINOR_VERSION 39
/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
@@ -269,6 +272,40 @@ struct fuse_attr {
uint32_t flags;
};
+/*
+ * The following structures are bit-for-bit compatible with the statx(2) ABI in
+ * Linux.
+ */
+struct fuse_sx_time {
+ int64_t tv_sec;
+ uint32_t tv_nsec;
+ int32_t __reserved;
+};
+
+struct fuse_statx {
+ uint32_t mask;
+ uint32_t blksize;
+ uint64_t attributes;
+ uint32_t nlink;
+ uint32_t uid;
+ uint32_t gid;
+ uint16_t mode;
+ uint16_t __spare0[1];
+ uint64_t ino;
+ uint64_t size;
+ uint64_t blocks;
+ uint64_t attributes_mask;
+ struct fuse_sx_time atime;
+ struct fuse_sx_time btime;
+ struct fuse_sx_time ctime;
+ struct fuse_sx_time mtime;
+ uint32_t rdev_major;
+ uint32_t rdev_minor;
+ uint32_t dev_major;
+ uint32_t dev_minor;
+ uint64_t __spare2[14];
+};
+
struct fuse_kstatfs {
uint64_t blocks;
uint64_t bfree;
@@ -575,6 +612,7 @@ enum fuse_opcode {
FUSE_REMOVEMAPPING = 49,
FUSE_SYNCFS = 50,
FUSE_TMPFILE = 51,
+ FUSE_STATX = 52,
/* CUSE specific operations */
CUSE_INIT = 4096,
@@ -639,6 +677,22 @@ struct fuse_attr_out {
struct fuse_attr attr;
};
+struct fuse_statx_in {
+ uint32_t getattr_flags;
+ uint32_t reserved;
+ uint64_t fh;
+ uint32_t sx_flags;
+ uint32_t sx_mask;
+};
+
+struct fuse_statx_out {
+ uint64_t attr_valid; /* Cache timeout for the attributes */
+ uint32_t attr_valid_nsec;
+ uint32_t flags;
+ uint64_t spare[2];
+ struct fuse_statx stat;
+};
+
#define FUSE_COMPAT_MKNOD_IN_SIZE 8
struct fuse_mknod_in {
--
2.40.1
next prev parent reply other threads:[~2023-08-10 10:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 10:54 [PATCH 0/5] fuse: support birth time Miklos Szeredi
2023-08-10 10:54 ` [PATCH 1/5] fuse: handle empty request_mask in statx Miklos Szeredi
2023-08-10 10:54 ` Miklos Szeredi [this message]
2023-08-10 13:22 ` [PATCH 2/5] fuse: add STATX request Bernd Schubert
2023-08-10 14:08 ` Miklos Szeredi
2023-08-10 15:50 ` Bernd Schubert
2023-08-10 10:54 ` [PATCH 3/5] fuse: add ATTR_TIMEOUT macro Miklos Szeredi
2023-08-10 10:55 ` [PATCH 4/5] fuse: implement statx Miklos Szeredi
2023-08-10 13:34 ` kernel test robot
2023-08-10 14:19 ` Miklos Szeredi
2023-08-22 15:20 ` Bernd Schubert
2023-08-22 15:33 ` Miklos Szeredi
2023-08-22 16:55 ` Bernd Schubert
2023-08-23 6:18 ` Miklos Szeredi
2023-08-23 14:51 ` Bernd Schubert
2023-08-23 14:58 ` Miklos Szeredi
2023-08-23 15:24 ` Bernd Schubert
2023-08-23 15:24 ` Bernd Schubert
2023-08-22 16:39 ` Bernd Schubert
2023-08-23 6:15 ` Miklos Szeredi
2023-08-10 10:55 ` [PATCH 5/5] fuse: cache btime Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230810105501.1418427-3-mszeredi@redhat.com \
--to=mszeredi@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).