@@ -110,95 +110,98 @@ bitflags! {
110
110
// INIT request/reply flags.
111
111
112
112
/// Asynchronous read requests.
113
- const ASYNC_READ : u32 = 0x1 ;
113
+ const ASYNC_READ : u64 = 0x1 ;
114
114
115
115
/// Remote locking for POSIX file locks.
116
- const POSIX_LOCKS : u32 = 0x2 ;
116
+ const POSIX_LOCKS : u64 = 0x2 ;
117
117
118
118
/// Kernel sends file handle for fstat, etc... (not yet supported).
119
- const FILE_OPS : u32 = 0x4 ;
119
+ const FILE_OPS : u64 = 0x4 ;
120
120
121
121
/// Handles the O_TRUNC open flag in the filesystem.
122
- const ATOMIC_O_TRUNC : u32 = 0x8 ;
122
+ const ATOMIC_O_TRUNC : u64 = 0x8 ;
123
123
124
124
/// FileSystem handles lookups of "." and "..".
125
- const EXPORT_SUPPORT : u32 = 0x10 ;
125
+ const EXPORT_SUPPORT : u64 = 0x10 ;
126
126
127
127
/// FileSystem can handle write size larger than 4kB.
128
- const BIG_WRITES : u32 = 0x20 ;
128
+ const BIG_WRITES : u64 = 0x20 ;
129
129
130
130
/// Don't apply umask to file mode on create operations.
131
- const DONT_MASK : u32 = 0x40 ;
131
+ const DONT_MASK : u64 = 0x40 ;
132
132
133
133
/// Kernel supports splice write on the device.
134
- const SPLICE_WRITE : u32 = 0x80 ;
134
+ const SPLICE_WRITE : u64 = 0x80 ;
135
135
136
136
/// Kernel supports splice move on the device.
137
- const SPLICE_MOVE : u32 = 0x100 ;
137
+ const SPLICE_MOVE : u64 = 0x100 ;
138
138
139
139
/// Kernel supports splice read on the device.
140
- const SPLICE_READ : u32 = 0x200 ;
140
+ const SPLICE_READ : u64 = 0x200 ;
141
141
142
142
/// Remote locking for BSD style file locks.
143
- const FLOCK_LOCKS : u32 = 0x400 ;
143
+ const FLOCK_LOCKS : u64 = 0x400 ;
144
144
145
145
/// Kernel supports ioctl on directories.
146
- const HAS_IOCTL_DIR : u32 = 0x800 ;
146
+ const HAS_IOCTL_DIR : u64 = 0x800 ;
147
147
148
148
/// Automatically invalidate cached pages.
149
- const AUTO_INVAL_DATA : u32 = 0x1000 ;
149
+ const AUTO_INVAL_DATA : u64 = 0x1000 ;
150
150
151
151
/// Do READDIRPLUS (READDIR+LOOKUP in one).
152
- const DO_READDIRPLUS : u32 = 0x2000 ;
152
+ const DO_READDIRPLUS : u64 = 0x2000 ;
153
153
154
154
/// Adaptive readdirplus.
155
- const READDIRPLUS_AUTO : u32 = 0x4000 ;
155
+ const READDIRPLUS_AUTO : u64 = 0x4000 ;
156
156
157
157
/// Asynchronous direct I/O submission.
158
- const ASYNC_DIO : u32 = 0x8000 ;
158
+ const ASYNC_DIO : u64 = 0x8000 ;
159
159
160
160
/// Use writeback cache for buffered writes.
161
- const WRITEBACK_CACHE : u32 = 0x1_0000 ;
161
+ const WRITEBACK_CACHE : u64 = 0x1_0000 ;
162
162
163
163
/// Kernel supports zero-message opens.
164
- const NO_OPEN_SUPPORT : u32 = 0x2_0000 ;
164
+ const NO_OPEN_SUPPORT : u64 = 0x2_0000 ;
165
165
166
166
/// Allow parallel lookups and readdir.
167
- const PARALLEL_DIROPS : u32 = 0x4_0000 ;
167
+ const PARALLEL_DIROPS : u64 = 0x4_0000 ;
168
168
169
169
/// Fs handles killing suid/sgid/cap on write/chown/trunc.
170
- const HANDLE_KILLPRIV : u32 = 0x8_0000 ;
170
+ const HANDLE_KILLPRIV : u64 = 0x8_0000 ;
171
171
172
172
/// FileSystem supports posix acls.
173
- const POSIX_ACL : u32 = 0x10_0000 ;
173
+ const POSIX_ACL : u64 = 0x10_0000 ;
174
174
175
175
// Reading the fuse device after abort returns ECONNABORTED
176
- const ABORT_ERROR : u32 = 0x20_0000 ;
176
+ const ABORT_ERROR : u64 = 0x20_0000 ;
177
177
178
178
// INIT response init_out.max_pages contains the max number of req pages
179
- const MAX_PAGES : u32 = 0x40_0000 ;
179
+ const MAX_PAGES : u64 = 0x40_0000 ;
180
180
181
181
// Kernel caches READLINK responses
182
- const CACHE_SYMLINKS : u32 = 0x80_0000 ;
182
+ const CACHE_SYMLINKS : u64 = 0x80_0000 ;
183
183
184
184
// Kernel supports zero-message opendir
185
- const NO_OPENDIR_SUPPORT : u32 = 0x100_0000 ;
185
+ const NO_OPENDIR_SUPPORT : u64 = 0x100_0000 ;
186
186
187
187
// Only invalidate cached pages on explicit request
188
- const EXPLICIT_INVAL_DATA : u32 = 0x200_0000 ;
188
+ const EXPLICIT_INVAL_DATA : u64 = 0x200_0000 ;
189
189
190
190
// INIT response init_out.map_alignment contains byte alignment for foffset and
191
191
// moffset fields in struct fuse_setupmapping_out and fuse_removemapping_one.
192
- const MAP_ALIGNMENT : u32 = 0x400_0000 ;
192
+ const MAP_ALIGNMENT : u64 = 0x400_0000 ;
193
193
194
194
// Kernel supports auto-mounting directory submounts
195
- const SUBMOUNTS : u32 = 0x800_0000 ;
195
+ const SUBMOUNTS : u64 = 0x800_0000 ;
196
196
197
197
// Filesystem responsible for clearing security.capability xattr and setuid/setgid bits.
198
- const HANDLE_KILLPRIV_V2 : u32 = 0x1000_0000 ;
198
+ const HANDLE_KILLPRIV_V2 : u64 = 0x1000_0000 ;
199
+
200
+ // This flag indicates whether the fuse_init_in is extended
201
+ const INIT_EXT : u64 = 0x4000_0000 ;
199
202
200
203
// This flag indicates whether the guest kernel enable per-file dax
201
- const PERFILE_DAX : u32 = 0x4000_0000 ;
204
+ const PERFILE_DAX : u64 = 0x2_0000_0000 ;
202
205
203
206
/**
204
207
*
@@ -214,7 +217,7 @@ pub const FUSE_ATTR_DAX: u32 = 1 << 1;
214
217
bitflags ! {
215
218
/// A bitfield passed in as a parameter to and returned from the `init` method of the
216
219
/// `FileSystem` trait.
217
- pub struct FsOptions : u32 {
220
+ pub struct FsOptions : u64 {
218
221
/// Indicates that the filesystem supports asynchronous read requests.
219
222
///
220
223
/// If this capability is not requested/available, the kernel will ensure that there is at
@@ -445,6 +448,9 @@ bitflags! {
445
448
/// -. write has WRITE_KILL_PRIV
446
449
const HANDLE_KILLPRIV_V2 = HANDLE_KILLPRIV_V2 ;
447
450
451
+ /// The fuse_init_in is extended.
452
+ const INIT_EXT = INIT_EXT ;
453
+
448
454
/// Indicates whether the guest kernel enable per-file dax
449
455
///
450
456
/// If this feature is enabled, filesystem will notify guest kernel whether file
@@ -1082,6 +1088,15 @@ pub struct InitIn {
1082
1088
}
1083
1089
unsafe impl ByteValued for InitIn { }
1084
1090
1091
+ //The flag has been extended to 64 bit since fuse 7.36
1092
+ #[ repr( C ) ]
1093
+ #[ derive( Debug , Default , Copy , Clone ) ]
1094
+ pub struct InitIn2 {
1095
+ pub flags2 : u32 ,
1096
+ pub unused : [ u32 ; 11 ] ,
1097
+ }
1098
+ unsafe impl ByteValued for InitIn2 { }
1099
+
1085
1100
#[ repr( C ) ]
1086
1101
#[ derive( Debug , Default , Copy , Clone ) ]
1087
1102
pub struct InitOut {
@@ -1095,7 +1110,8 @@ pub struct InitOut {
1095
1110
pub time_gran : u32 ,
1096
1111
pub max_pages : u16 ,
1097
1112
pub map_alignment : u16 ,
1098
- pub unused : [ u32 ; 8 ] ,
1113
+ pub flags2 : u32 ,
1114
+ pub unused : [ u32 ; 7 ] ,
1099
1115
}
1100
1116
unsafe impl ByteValued for InitOut { }
1101
1117
0 commit comments