diff options
| author | Thierry Strudel <tstrudel@google.com> | 2016-01-14 00:52:50 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2016-01-14 00:52:50 +0000 |
| commit | 234a846ac8223390310c8ec4d723eafbe9ee1f86 (patch) | |
| tree | 36c395d13ed3f95d1c209f56bb2b3583dc66cee2 /sdcard | |
| parent | ccfb90d1aaa3cf334be4cfda1131a533489326bb (diff) | |
| parent | bbaa2b296ad836e9d6511549661884d94b53ccee (diff) | |
| download | system_core-234a846ac8223390310c8ec4d723eafbe9ee1f86.tar.gz system_core-234a846ac8223390310c8ec4d723eafbe9ee1f86.tar.bz2 system_core-234a846ac8223390310c8ec4d723eafbe9ee1f86.zip | |
Merge "[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available" into mnc-dr1.5-dev am: b84295d027
am: bbaa2b296a
* commit 'bbaa2b296ad836e9d6511549661884d94b53ccee':
[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available
Diffstat (limited to 'sdcard')
| -rw-r--r-- | sdcard/sdcard.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c index 45efe369e..f86256195 100644 --- a/sdcard/sdcard.c +++ b/sdcard/sdcard.c @@ -1214,7 +1214,13 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler, } out.fh = ptr_to_id(h); out.open_flags = 0; + +#ifdef FUSE_STACKED_IO + out.lower_fd = h->fd; +#else out.padding = 0; +#endif + fuse_reply(fuse, hdr->unique, &out, sizeof(out)); return NO_STATUS; } @@ -1378,7 +1384,13 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler, } out.fh = ptr_to_id(h); out.open_flags = 0; + +#ifdef FUSE_STACKED_IO + out.lower_fd = -1; +#else out.padding = 0; +#endif + fuse_reply(fuse, hdr->unique, &out, sizeof(out)); return NO_STATUS; } @@ -1460,6 +1472,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_STACKED_IO + out.flags |= FUSE_STACKED_IO; +#endif + out.max_background = 32; out.congestion_threshold = 32; out.max_write = MAX_WRITE; |
