summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Strudel2016-01-13 18:32:01 -0600
committerAndroid (Google) Code Review2016-01-13 18:32:01 -0600
commitb84295d027c9d86720d93e19eb5c1b644553d647 (patch)
tree9b2c700382a78850fd52182f2cecfac4e9be57bb
parent905ad1d3e7531b49374573cd801fa92a480c97b8 (diff)
parentac5175f9a67d649f98dfbeef60026bf5dafa7da1 (diff)
downloadplatform-system-core-b84295d027c9d86720d93e19eb5c1b644553d647.tar.gz
platform-system-core-b84295d027c9d86720d93e19eb5c1b644553d647.tar.xz
platform-system-core-b84295d027c9d86720d93e19eb5c1b644553d647.zip
Merge "[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available" into mnc-dr1.5-devandroid-6.0.1_r22android-6.0.1_r21
-rw-r--r--sdcard/sdcard.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index 06452aa47..e9aa770a5 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -1214,7 +1214,13 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler,
1214 } 1214 }
1215 out.fh = ptr_to_id(h); 1215 out.fh = ptr_to_id(h);
1216 out.open_flags = 0; 1216 out.open_flags = 0;
1217
1218#ifdef FUSE_STACKED_IO
1219 out.lower_fd = h->fd;
1220#else
1217 out.padding = 0; 1221 out.padding = 0;
1222#endif
1223
1218 fuse_reply(fuse, hdr->unique, &out, sizeof(out)); 1224 fuse_reply(fuse, hdr->unique, &out, sizeof(out));
1219 return NO_STATUS; 1225 return NO_STATUS;
1220} 1226}
@@ -1378,7 +1384,13 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler,
1378 } 1384 }
1379 out.fh = ptr_to_id(h); 1385 out.fh = ptr_to_id(h);
1380 out.open_flags = 0; 1386 out.open_flags = 0;
1387
1388#ifdef FUSE_STACKED_IO
1389 out.lower_fd = -1;
1390#else
1381 out.padding = 0; 1391 out.padding = 0;
1392#endif
1393
1382 fuse_reply(fuse, hdr->unique, &out, sizeof(out)); 1394 fuse_reply(fuse, hdr->unique, &out, sizeof(out));
1383 return NO_STATUS; 1395 return NO_STATUS;
1384} 1396}
@@ -1460,6 +1472,11 @@ static int handle_init(struct fuse* fuse, struct fuse_handler* handler,
1460 out.major = FUSE_KERNEL_VERSION; 1472 out.major = FUSE_KERNEL_VERSION;
1461 out.max_readahead = req->max_readahead; 1473 out.max_readahead = req->max_readahead;
1462 out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES; 1474 out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES;
1475
1476#ifdef FUSE_STACKED_IO
1477 out.flags |= FUSE_STACKED_IO;
1478#endif
1479
1463 out.max_background = 32; 1480 out.max_background = 32;
1464 out.congestion_threshold = 32; 1481 out.congestion_threshold = 32;
1465 out.max_write = MAX_WRITE; 1482 out.max_write = MAX_WRITE;