Use passthrough if file supports transcoding
Using passthrough when a file supports transcoding improves the
performance of IO during transcoding.
Test: atest TranscodeTest
Bug: 174655855
Change-Id: I6a4b237ef9cead7d87ed70fed403ebb7df11a809
diff --git a/jni/FuseDaemon.cpp b/jni/FuseDaemon.cpp
index a75660c..673771b 100755
--- a/jni/FuseDaemon.cpp
+++ b/jni/FuseDaemon.cpp
@@ -1036,7 +1036,8 @@
if (fuse->passthrough) {
*keep_cache = 1;
- handle = new struct handle(fd, ri, true /* cached */, !redaction_needed /* passthrough */,
+ handle = new struct handle(fd, ri, true /* cached */,
+ !redaction_needed || node->GetTransforms() /* passthrough */,
uid);
} else {
// Without fuse->passthrough, we don't want to use the FUSE VFS cache in two cases: