Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/fs/fusefs/mockfs.hh
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | ResultOf([=](auto in) { \ | ||||
in.header.nodeid == (parent) && \ | in.header.nodeid == (parent) && \ | ||||
strcmp(in.body.lookup, (path)) == 0); \ | strcmp(in.body.lookup, (path)) == 0); \ | ||||
}, Eq(true)), \ | }, Eq(true)), \ | ||||
_) \ | _) \ | ||||
) | ) | ||||
extern int verbosity; | extern int verbosity; | ||||
/* | |||||
* The maximum that a test case can set max_write, limited by the buffer | |||||
* supplied when reading from /dev/fuse. This limitation is imposed by | |||||
* fusefs-libs, but not by the FUSE protocol. | |||||
*/ | |||||
const uint32_t max_max_write = 0x20000; | |||||
/* This struct isn't defined by fuse_kernel.h or libfuse, but it should be */ | /* This struct isn't defined by fuse_kernel.h or libfuse, but it should be */ | ||||
struct fuse_create_out { | struct fuse_create_out { | ||||
struct fuse_entry_out entry; | struct fuse_entry_out entry; | ||||
struct fuse_open_out open; | struct fuse_open_out open; | ||||
}; | }; | ||||
/* Protocol 7.8 version of struct fuse_attr */ | /* Protocol 7.8 version of struct fuse_attr */ | ||||
struct fuse_attr_7_8 | struct fuse_attr_7_8 | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | struct fuse_init_out_7_22 { | ||||
uint16_t max_background; | uint16_t max_background; | ||||
uint16_t congestion_threshold; | uint16_t congestion_threshold; | ||||
uint32_t max_write; | uint32_t max_write; | ||||
}; | }; | ||||
union fuse_payloads_in { | union fuse_payloads_in { | ||||
fuse_access_in access; | fuse_access_in access; | ||||
fuse_bmap_in bmap; | fuse_bmap_in bmap; | ||||
/* value is from fuse_kern_chan.c in fusefs-libs */ | /* | ||||
uint8_t bytes[0x21000 - sizeof(struct fuse_in_header)]; | * In fusefs-libs 3.4.2 and below the buffer size is fixed at 0x21000 | ||||
* minus the header sizes. fusefs-libs 3.4.3 (and FUSE Protocol 7.29) | |||||
* add a FUSE_MAX_PAGES option that allows it to be greater. | |||||
* | |||||
* See fuse_kern_chan.c in fusefs-libs 2.9.9 and below, or | |||||
* FUSE_DEFAULT_MAX_PAGES_PER_REQ in fusefs-libs 3.4.3 and above. | |||||
*/ | |||||
uint8_t bytes[ | |||||
max_max_write + 0x1000 - sizeof(struct fuse_in_header) | |||||
]; | |||||
fuse_create_in create; | fuse_create_in create; | ||||
fuse_flush_in flush; | fuse_flush_in flush; | ||||
fuse_fsync_in fsync; | fuse_fsync_in fsync; | ||||
fuse_fsync_in fsyncdir; | fuse_fsync_in fsyncdir; | ||||
fuse_forget_in forget; | fuse_forget_in forget; | ||||
fuse_getattr_in getattr; | fuse_getattr_in getattr; | ||||
fuse_interrupt_in interrupt; | fuse_interrupt_in interrupt; | ||||
fuse_lk_in getlk; | fuse_lk_in getlk; | ||||
▲ Show 20 Lines • Show All 254 Lines • Show Last 20 Lines |