Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_ipc.h
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | |||||
#define FSESS_DEFAULT_PERMISSIONS 0x0040 /* kernel does permission checking */ | #define FSESS_DEFAULT_PERMISSIONS 0x0040 /* kernel does permission checking */ | ||||
#define FSESS_NO_ATTRCACHE 0x0080 /* no attribute caching */ | #define FSESS_NO_ATTRCACHE 0x0080 /* no attribute caching */ | ||||
#define FSESS_NO_READAHEAD 0x0100 /* no readaheads */ | #define FSESS_NO_READAHEAD 0x0100 /* no readaheads */ | ||||
#define FSESS_NO_DATACACHE 0x0200 /* disable buffer cache */ | #define FSESS_NO_DATACACHE 0x0200 /* disable buffer cache */ | ||||
#define FSESS_NO_NAMECACHE 0x0400 /* disable name cache */ | #define FSESS_NO_NAMECACHE 0x0400 /* disable name cache */ | ||||
#define FSESS_NO_MMAP 0x0800 /* disable mmap */ | #define FSESS_NO_MMAP 0x0800 /* disable mmap */ | ||||
#define FSESS_BROKENIO 0x1000 /* fix broken io */ | #define FSESS_BROKENIO 0x1000 /* fix broken io */ | ||||
extern int fuse_data_cache_enable; | enum fuse_data_cache_mode { | ||||
FUSE_CACHE_UC, | |||||
FUSE_CACHE_WT, | |||||
FUSE_CACHE_WB, | |||||
}; | |||||
extern int fuse_data_cache_mode; | |||||
extern int fuse_data_cache_invalidate; | extern int fuse_data_cache_invalidate; | ||||
extern int fuse_mmap_enable; | extern int fuse_mmap_enable; | ||||
extern int fuse_sync_resize; | extern int fuse_sync_resize; | ||||
extern int fuse_fix_broken_io; | extern int fuse_fix_broken_io; | ||||
static __inline__ | static __inline__ | ||||
struct fuse_data * | struct fuse_data * | ||||
fuse_get_mpdata(struct mount *mp) | fuse_get_mpdata(struct mount *mp) | ||||
Show All 17 Lines | fsess_set_notimpl(struct mount *mp, int opcode) | ||||
data->notimpl |= (1ULL << opcode); | data->notimpl |= (1ULL << opcode); | ||||
} | } | ||||
static __inline int | static __inline int | ||||
fsess_opt_datacache(struct mount *mp) | fsess_opt_datacache(struct mount *mp) | ||||
{ | { | ||||
struct fuse_data *data = fuse_get_mpdata(mp); | struct fuse_data *data = fuse_get_mpdata(mp); | ||||
return (fuse_data_cache_enable || | return (fuse_data_cache_mode != FUSE_CACHE_UC && | ||||
(data->dataflags & FSESS_NO_DATACACHE) == 0); | (data->dataflags & FSESS_NO_DATACACHE) == 0); | ||||
} | } | ||||
static __inline int | static __inline int | ||||
fsess_opt_mmap(struct mount *mp) | fsess_opt_mmap(struct mount *mp) | ||||
{ | { | ||||
struct fuse_data *data = fuse_get_mpdata(mp); | struct fuse_data *data = fuse_get_mpdata(mp); | ||||
if (!(fuse_mmap_enable && fuse_data_cache_enable)) | if (!fuse_mmap_enable || fuse_data_cache_mode == FUSE_CACHE_UC) | ||||
return 0; | return 0; | ||||
return ((data->dataflags & (FSESS_NO_DATACACHE | FSESS_NO_MMAP)) == 0); | return ((data->dataflags & (FSESS_NO_DATACACHE | FSESS_NO_MMAP)) == 0); | ||||
} | } | ||||
static __inline int | static __inline int | ||||
fsess_opt_brokenio(struct mount *mp) | fsess_opt_brokenio(struct mount *mp) | ||||
{ | { | ||||
struct fuse_data *data = fuse_get_mpdata(mp); | struct fuse_data *data = fuse_get_mpdata(mp); | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |