summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/fuse.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-12 14:36:04 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-12 14:36:04 -0700
commite6df6222accfc44c351f7dbaaf6a57ae1003881f (patch)
tree968ddf91b34dbe1b5b2f845031f35a7670d9e180 /pkg/abi/linux/fuse.go
parent00b684ea7fd96beb32d1517dd06c5d736621ff70 (diff)
parent51e64d2fc590b0271d4e0cbbc75882cf81ada182 (diff)
Merge pull request #3250 from craig08:fuse-getattr
PiperOrigin-RevId: 326313858
Diffstat (limited to 'pkg/abi/linux/fuse.go')
-rw-r--r--pkg/abi/linux/fuse.go55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkg/abi/linux/fuse.go b/pkg/abi/linux/fuse.go
index 5c6ffe4a3..7e30483ee 100644
--- a/pkg/abi/linux/fuse.go
+++ b/pkg/abi/linux/fuse.go
@@ -246,3 +246,58 @@ type FUSEInitOut struct {
_ [8]uint32
}
+
+// FUSEGetAttrIn is the request sent by the kernel to the daemon,
+// to get the attribute of a inode.
+//
+// +marshal
+type FUSEGetAttrIn struct {
+ // GetAttrFlags specifies whether getattr request is sent with a nodeid or
+ // with a file handle.
+ GetAttrFlags uint32
+
+ _ uint32
+
+ // Fh is the file handler when GetAttrFlags has FUSE_GETATTR_FH bit. If
+ // used, the operation is analogous to fstat(2).
+ Fh uint64
+}
+
+// FUSEAttr is the struct used in the reponse FUSEGetAttrOut.
+//
+// +marshal
+type FUSEAttr struct {
+ Ino uint64
+ Size uint64
+ Blocks uint64
+ Atime uint64
+ Mtime uint64
+ Ctime uint64
+ AtimeNsec uint32
+ MtimeNsec uint32
+ CtimeNsec uint32
+ Mode uint32
+ Nlink uint32
+ UID uint32
+ GID uint32
+ Rdev uint32
+ BlkSize uint32
+ _ uint32
+}
+
+// FUSEGetAttrOut is the reply sent by the daemon to the kernel
+// for FUSEGetAttrIn.
+//
+// +marshal
+type FUSEGetAttrOut struct {
+ // AttrValid and AttrValidNsec describe the attribute cache duration
+ AttrValid uint64
+
+ // AttrValidNsec is the nanosecond part of the attribute cache duration
+ AttrValidNsec uint32
+
+ _ uint32
+
+ // Attr contains the metadata returned from the FUSE server
+ Attr FUSEAttr
+}