@@ -22,7 +22,6 @@ struct fuse_out_header {
22
22
uint64_t unique ;
23
23
};
24
24
25
-
26
25
struct vfs_req_header {
27
26
struct fuse_in_header in ;
28
27
};
@@ -32,68 +31,67 @@ struct vfs_resp_header {
32
31
};
33
32
34
33
struct fuse_init_in {
35
- uint32_t major ; // FUSE major version supported by the guest (typically 7)
36
- uint32_t minor ; // FUSE minor version supported by the guest (e.g., 31, 26)
37
- uint32_t max_readahead ; // Maximum readahead size supported by the guest
38
- // (e.g., 0x10000)
39
- uint32_t flags ; // Flags requested by the guest (e.g., support for
40
- // writeback cache)
34
+ /* FUSE major version supported by the guest (typically 7) */
35
+ uint32_t major ;
36
+ /* FUSE minor version supported by the guest (e.g., 31, 26) */
37
+ uint32_t minor ;
38
+ uint32_t max_readahead ; /* Maximum readahead size supported by the guest */
39
+ uint32_t flags ; /* Flags requested by the guest */
41
40
};
42
41
43
42
struct fuse_init_out {
44
- uint32_t major ; // FUSE major version supported by the device
45
- uint32_t minor ; // FUSE minor version supported by the device
46
- uint32_t max_readahead ; // Maximum readahead size accepted by the device
47
- uint32_t
48
- flags ; // Flags supported by the device (negotiated with the guest)
49
- uint16_t max_background ; // Maximum number of background requests
50
- uint16_t
51
- congestion_threshold ; // Threshold for marking the connection congested
52
- uint32_t max_write ; // Maximum write size the device can handle
53
- uint32_t time_gran ; // Time granularity (in nanoseconds)
54
- uint32_t unused [11 ]; // Reserved
43
+ uint32_t major ; /* FUSE major version supported by the device */
44
+ uint32_t minor ; /* FUSE minor version supported by the device */
45
+ uint32_t max_readahead ; /* Maximum readahead size accepted by the device */
46
+ /* Flags supported by the device (negotiated with the guest) */
47
+ uint32_t flags ;
48
+ uint16_t max_background ; /* Maximum number of background requests */
49
+ uint16_t congestion_threshold ;
50
+ uint32_t max_write ; /* Maximum write size the device can handle */
51
+ uint32_t time_gran ; /* Time granularity (in nanoseconds) */
52
+ uint32_t unused [11 ]; /* Reserved */
55
53
};
56
54
57
55
struct fuse_getattr_in {
58
- uint32_t getattr_flags ; // bitmask for valid fields (e.g. FUSE_GETATTR_FH)
59
- uint32_t padding ; // unused, reserved for alignment
60
- uint64_t fh ; // optional: file handle (used when getattr_flags has
61
- // FUSE_GETATTR_FH)
56
+ /* bitmask for valid fields (e.g. FUSE_GETATTR_FH) */
57
+ uint32_t getattr_flags ;
58
+ uint32_t padding ; /* unused, reserved for alignment */
59
+ uint64_t fh ; /* optional: file handle (used when getattr_flags has */
62
60
};
63
61
64
62
struct fuse_attr {
65
- uint64_t ino ; // inode number
66
- uint64_t size ; // file size in bytes
67
- uint64_t blocks ; // number of 512B blocks allocated
68
- uint64_t atime ; // last access time (UNIX time)
69
- uint64_t mtime ; // last modification time
70
- uint64_t ctime ; // last status change time
71
- uint32_t atimensec ; // nanoseconds part
63
+ uint64_t ino ; /* inode number */
64
+ uint64_t size ; /* file size in bytes */
65
+ uint64_t blocks ; /* number of 512B blocks allocated */
66
+ uint64_t atime ; /* last access time (UNIX time) */
67
+ uint64_t mtime ; /* last modification time */
68
+ uint64_t ctime ; /* last status change time */
69
+ uint32_t atimensec ; /* nanoseconds part */
72
70
uint32_t mtimensec ;
73
71
uint32_t ctimensec ;
74
- uint32_t mode ; // file mode (e.g. S_IFDIR | 0755)
75
- uint32_t nlink ; // number of hard links
76
- uint32_t uid ; // owner uid
77
- uint32_t gid ; // owner gid
78
- uint32_t rdev ; // device ID (if special file)
79
- uint32_t blksize ; // block size
80
- uint32_t flags ; // reserved
72
+ uint32_t mode ; /* file mode (e.g. S_IFDIR | 0755) */
73
+ uint32_t nlink ; /* number of hard links */
74
+ uint32_t uid ; /* owner uid */
75
+ uint32_t gid ; /* owner gid */
76
+ uint32_t rdev ; /* device ID (if special file) */
77
+ uint32_t blksize ; /* block size */
78
+ uint32_t flags ; /* reserved */
81
79
};
82
80
83
81
struct fuse_attr_out {
84
- uint64_t attr_valid ; // seconds the attributes are valid
85
- uint32_t attr_valid_nsec ; // nanoseconds part of attr_valid
86
- uint32_t dummy ; // padding for alignment
87
- struct fuse_attr attr ; // actual attributes
82
+ uint64_t attr_valid ; /* seconds the attributes are valid */
83
+ uint32_t attr_valid_nsec ; /* nanoseconds part of attr_valid */
84
+ uint32_t dummy ; /* padding for alignment */
85
+ struct fuse_attr attr ; /* actual attributes */
88
86
};
89
87
90
88
struct fuse_open_in {
91
89
uint32_t flags ;
92
- uint32_t open_flags ; /* FUSE_OPEN_... */
90
+ uint32_t open_flags ;
93
91
};
94
92
95
93
struct fuse_open_out {
96
- uint64_t fh ; // file handle
94
+ uint64_t fh ;
97
95
uint32_t open_flags ;
98
96
int32_t backing_id ;
99
97
};
@@ -109,21 +107,21 @@ struct fuse_read_in {
109
107
};
110
108
111
109
struct fuse_entry_out {
112
- uint64_t nodeid ; // inode number
113
- uint64_t generation ; // inode generation
114
- uint64_t entry_valid ; // cache timeout (sec)
115
- uint64_t attr_valid ; // attr cache timeout (sec)
116
- uint32_t entry_valid_nsec ; // cache timeout (nsec)
117
- uint32_t attr_valid_nsec ; // attr cache timeout (nsec)
118
- struct fuse_attr attr ; // file attributes
110
+ uint64_t nodeid ; /* inode number */
111
+ uint64_t generation ; /* inode generation */
112
+ uint64_t entry_valid ; /* cache timeout (sec) */
113
+ uint64_t attr_valid ; /* attr cache timeout (sec) */
114
+ uint32_t entry_valid_nsec ; /* cache timeout (nsec) */
115
+ uint32_t attr_valid_nsec ; /* attr cache timeout (nsec) */
116
+ struct fuse_attr attr ; /* file attributes */
119
117
};
120
118
121
119
struct fuse_dirent {
122
- uint64_t ino ; // inode number
123
- uint64_t off ; // offset to next entry
124
- uint32_t namelen ; // length of the entry name
125
- uint32_t type ; // file type (DT_REG, DT_DIR, etc.)
126
- char name []; // name (not null-terminated)
120
+ uint64_t ino ; /* inode number */
121
+ uint64_t off ; /* offset to next entry */
122
+ uint32_t namelen ; /* length of the entry name */
123
+ uint32_t type ; /* file type (DT_REG, DT_DIR, etc.) */
124
+ char name []; /* name (not null-terminated) */
127
125
};
128
126
129
127
struct fuse_direntplus {
@@ -132,8 +130,7 @@ struct fuse_direntplus {
132
130
};
133
131
134
132
struct fuse_lookup_in {
135
- uint64_t parent ; // inode of parent dir
136
- // char name[]; // followed by name (not null-terminated!)
133
+ uint64_t parent ; /* inode of parent dir */
137
134
};
138
135
139
136
struct fuse_forget_in {
@@ -144,7 +141,7 @@ struct fuse_create_in {
144
141
uint32_t flags ;
145
142
uint32_t mode ;
146
143
uint32_t umask ;
147
- uint32_t open_flags ; /* FUSE_OPEN_... */
144
+ uint32_t open_flags ;
148
145
};
149
146
150
147
struct fuse_release_in {
0 commit comments