diff options
| author | Thierry Strudel <tstrudel@google.com> | 2016-09-26 21:25:32 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2016-09-26 21:25:32 +0000 |
| commit | 55cec5870328ea18efacce81fa6e652066fdcc5d (patch) | |
| tree | 88d24d741302cdd1480b81296d48965a66a17f50 /sdcard | |
| parent | 3cca209b912af721746871a6fc1a48a1fc6985ec (diff) | |
| parent | 5f4db94228f1d414b38771d933b778920510ef0a (diff) | |
| download | system_core-55cec5870328ea18efacce81fa6e652066fdcc5d.tar.gz system_core-55cec5870328ea18efacce81fa6e652066fdcc5d.tar.bz2 system_core-55cec5870328ea18efacce81fa6e652066fdcc5d.zip | |
[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available am: 738e0dcf0a
am: 5f4db94228
Change-Id: I05fbf1cffb44595d354219b1753cd7c2b37e10db
Diffstat (limited to 'sdcard')
| -rw-r--r-- | sdcard/fuse.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sdcard/fuse.cpp b/sdcard/fuse.cpp index f549606a9..b24c0d427 100644 --- a/sdcard/fuse.cpp +++ b/sdcard/fuse.cpp @@ -1011,7 +1011,13 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler, } out.fh = ptr_to_id(h); out.open_flags = 0; + +#ifdef FUSE_SHORTCIRCUIT + out.lower_fd = h->fd; +#else out.padding = 0; +#endif + fuse_reply(fuse, hdr->unique, &out, sizeof(out)); return NO_STATUS; } @@ -1175,7 +1181,13 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler, } out.fh = ptr_to_id(h); out.open_flags = 0; + +#ifdef FUSE_SHORTCIRCUIT + out.lower_fd = -1; +#else out.padding = 0; +#endif + fuse_reply(fuse, hdr->unique, &out, sizeof(out)); return NO_STATUS; } @@ -1258,6 +1270,11 @@ static int handle_init(struct fuse* fuse, struct fuse_handler* handler, out.major = FUSE_KERNEL_VERSION; out.max_readahead = req->max_readahead; out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES; + +#ifdef FUSE_SHORTCIRCUIT + out.flags |= FUSE_SHORTCIRCUIT; +#endif + out.max_background = 32; out.congestion_threshold = 32; out.max_write = MAX_WRITE; |
