• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Révision738e0dcf0a09fa7659a7efa79de9482f7cf54e4f (tree)
l'heure2016-08-04 21:02:18
AuteurThierry Strudel <tstrudel@goog...>
CommiterThierry Strudel

Message de Log

[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

Change Summary

Modification

--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -1221,7 +1221,13 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler,
12211221 }
12221222 out.fh = ptr_to_id(h);
12231223 out.open_flags = 0;
1224+
1225+#ifdef FUSE_SHORTCIRCUIT
1226+ out.lower_fd = h->fd;
1227+#else
12241228 out.padding = 0;
1229+#endif
1230+
12251231 fuse_reply(fuse, hdr->unique, &out, sizeof(out));
12261232 return NO_STATUS;
12271233 }
@@ -1385,7 +1391,13 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler,
13851391 }
13861392 out.fh = ptr_to_id(h);
13871393 out.open_flags = 0;
1394+
1395+#ifdef FUSE_SHORTCIRCUIT
1396+ out.lower_fd = -1;
1397+#else
13881398 out.padding = 0;
1399+#endif
1400+
13891401 fuse_reply(fuse, hdr->unique, &out, sizeof(out));
13901402 return NO_STATUS;
13911403 }
@@ -1467,6 +1479,11 @@ static int handle_init(struct fuse* fuse, struct fuse_handler* handler,
14671479 out.major = FUSE_KERNEL_VERSION;
14681480 out.max_readahead = req->max_readahead;
14691481 out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES;
1482+
1483+#ifdef FUSE_SHORTCIRCUIT
1484+ out.flags |= FUSE_SHORTCIRCUIT;
1485+#endif
1486+
14701487 out.max_background = 32;
14711488 out.congestion_threshold = 32;
14721489 out.max_write = MAX_WRITE;