Browse Source
Merge pull request #623 from trapexit/async_dio
ensure async_aio is enabled if capable
pull/624/head
trapexit
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
0 deletions
-
libfuse/include/fuse_common.h
-
libfuse/lib/fuse_lowlevel.c
-
src/fuse_init.cpp
|
|
@ -112,6 +112,7 @@ struct fuse_file_info { |
|
|
|
#define FUSE_CAP_SPLICE_READ (1 << 9) |
|
|
|
#define FUSE_CAP_FLOCK_LOCKS (1 << 10) |
|
|
|
#define FUSE_CAP_IOCTL_DIR (1 << 11) |
|
|
|
#define FUSE_CAP_ASYNC_DIO (1 << 15) |
|
|
|
#define FUSE_CAP_POSIX_ACL (1 << 19) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1797,6 +1797,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) |
|
|
|
f->conn.capable |= FUSE_CAP_FLOCK_LOCKS; |
|
|
|
if (arg->flags & FUSE_POSIX_ACL) |
|
|
|
f->conn.capable |= FUSE_CAP_POSIX_ACL; |
|
|
|
if (arg->flags & FUSE_ASYNC_DIO) |
|
|
|
f->conn.capable |= FUSE_CAP_ASYNC_DIO; |
|
|
|
} else { |
|
|
|
f->conn.async_read = 0; |
|
|
|
f->conn.max_readahead = 0; |
|
|
@ -1865,6 +1867,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) |
|
|
|
outarg.flags |= FUSE_FLOCK_LOCKS; |
|
|
|
if (f->conn.want & FUSE_CAP_POSIX_ACL) |
|
|
|
outarg.flags |= FUSE_POSIX_ACL; |
|
|
|
if (f->conn.want & FUSE_CAP_ASYNC_DIO) |
|
|
|
outarg.flags |= FUSE_ASYNC_DIO; |
|
|
|
outarg.max_readahead = f->conn.max_readahead; |
|
|
|
outarg.max_write = f->conn.max_write; |
|
|
|
if (f->conn.proto_minor >= 13) { |
|
|
|
|
|
@ -42,6 +42,7 @@ namespace FUSE |
|
|
|
l::want_if_capable(conn_,FUSE_CAP_BIG_WRITES); |
|
|
|
l::want_if_capable(conn_,FUSE_CAP_DONT_MASK); |
|
|
|
l::want_if_capable(conn_,FUSE_CAP_IOCTL_DIR); |
|
|
|
l::want_if_capable(conn_,FUSE_CAP_ASYNC_DIO); |
|
|
|
if(Config::get().posix_acl) |
|
|
|
l::want_if_capable(conn_,FUSE_CAP_POSIX_ACL); |
|
|
|
|
|
|
|