mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-29 11:26:44 -05:00
add writeback caching
This commit is contained in:
parent
e6c8fa3fad
commit
903d39f968
10 changed files with 103 additions and 17 deletions
|
|
@ -121,6 +121,7 @@ fuse_file_info
|
|||
#define FUSE_CAP_FLOCK_LOCKS (1 << 10)
|
||||
#define FUSE_CAP_IOCTL_DIR (1 << 11)
|
||||
#define FUSE_CAP_ASYNC_DIO (1 << 15)
|
||||
#define FUSE_CAP_WRITEBACK_CACHE (1 << 16)
|
||||
#define FUSE_CAP_PARALLEL_DIROPS (1 << 18)
|
||||
#define FUSE_CAP_POSIX_ACL (1 << 19)
|
||||
#define FUSE_CAP_CACHE_SYMLINKS (1 << 20)
|
||||
|
|
|
|||
|
|
@ -1794,6 +1794,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
|
|||
f->conn.capable |= FUSE_CAP_PARALLEL_DIROPS;
|
||||
if (arg->flags & FUSE_MAX_PAGES)
|
||||
f->conn.capable |= FUSE_CAP_MAX_PAGES;
|
||||
if (arg->flags & FUSE_WRITEBACK_CACHE)
|
||||
f->conn.capable |= FUSE_CAP_WRITEBACK_CACHE;
|
||||
} else {
|
||||
f->conn.want &= ~FUSE_CAP_ASYNC_READ;
|
||||
f->conn.max_readahead = 0;
|
||||
|
|
@ -1870,6 +1872,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
|
|||
outarg.flags |= FUSE_ASYNC_DIO;
|
||||
if (f->conn.want & FUSE_CAP_PARALLEL_DIROPS)
|
||||
outarg.flags |= FUSE_PARALLEL_DIROPS;
|
||||
if (f->conn.want & FUSE_CAP_WRITEBACK_CACHE)
|
||||
outarg.flags |= FUSE_WRITEBACK_CACHE;
|
||||
outarg.max_readahead = f->conn.max_readahead;
|
||||
outarg.max_write = f->conn.max_write;
|
||||
if (f->conn.proto_minor >= 13) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue