system/corennnnn
Révision | 738e0dcf0a09fa7659a7efa79de9482f7cf54e4f (tree) |
---|---|
l'heure | 2016-08-04 21:02:18 |
Auteur | Thierry Strudel <tstrudel@goog...> |
Commiter | Thierry Strudel |
[DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available
Use a non yet maintainer reviewed kernel patch from QCOM that greatly
improves IO speed in case it is available from the device specific
kernel headers.
Bug: 24216004
Bug: 30222859
Change-Id: I4101d80082c9ad9d042dde5c620ddb309d193d52
@@ -1221,7 +1221,13 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler, | ||
1221 | 1221 | } |
1222 | 1222 | out.fh = ptr_to_id(h); |
1223 | 1223 | out.open_flags = 0; |
1224 | + | |
1225 | +#ifdef FUSE_SHORTCIRCUIT | |
1226 | + out.lower_fd = h->fd; | |
1227 | +#else | |
1224 | 1228 | out.padding = 0; |
1229 | +#endif | |
1230 | + | |
1225 | 1231 | fuse_reply(fuse, hdr->unique, &out, sizeof(out)); |
1226 | 1232 | return NO_STATUS; |
1227 | 1233 | } |
@@ -1385,7 +1391,13 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler, | ||
1385 | 1391 | } |
1386 | 1392 | out.fh = ptr_to_id(h); |
1387 | 1393 | out.open_flags = 0; |
1394 | + | |
1395 | +#ifdef FUSE_SHORTCIRCUIT | |
1396 | + out.lower_fd = -1; | |
1397 | +#else | |
1388 | 1398 | out.padding = 0; |
1399 | +#endif | |
1400 | + | |
1389 | 1401 | fuse_reply(fuse, hdr->unique, &out, sizeof(out)); |
1390 | 1402 | return NO_STATUS; |
1391 | 1403 | } |
@@ -1467,6 +1479,11 @@ static int handle_init(struct fuse* fuse, struct fuse_handler* handler, | ||
1467 | 1479 | out.major = FUSE_KERNEL_VERSION; |
1468 | 1480 | out.max_readahead = req->max_readahead; |
1469 | 1481 | out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES; |
1482 | + | |
1483 | +#ifdef FUSE_SHORTCIRCUIT | |
1484 | + out.flags |= FUSE_SHORTCIRCUIT; | |
1485 | +#endif | |
1486 | + | |
1470 | 1487 | out.max_background = 32; |
1471 | 1488 | out.congestion_threshold = 32; |
1472 | 1489 | out.max_write = MAX_WRITE; |