mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 20:45:43 +00:00
* Skip per-component link walk for plain paths in binds Open the translated host path with O_PATH and compare /proc/self/fd against it; when no link was crossed, return it without walking each component. follow_guest_link reuses the result instead of rewriting the path a second time. Cuts stat/open on deep SD-card files from about 5.7 ms to 1.4 ms. * Test link handling and plain paths inside native binds * Check missing paths in binds from their deepest existing folder A path below folders that do not exist fell back to a readlink of every component, one full lookup each; on a FUSE card that cost up to 8 ms per probe. The check now climbs to the deepest folder that exists and verifies that one, so links before it are still followed and nothing below it can be a link. * Skip the link walk for mounts on file systems that cannot hold links A mount whose source is on vfat or exFAT, or on a FUSE volume backed by one (Android's SD card), cannot hold symbolic links, so every path in it is plain. Each mount checks the mount table once, then its paths skip the link walk and the follow readlink. On the SD card this removes about two FUSE lookups per file operation. * Keep the link walk for truncated mount tables and non-volume FUSE mounts * Skip the last link check for drive paths into mounts that hold no links Wine reaches games on an SD card library through a drive link in the prefix (dosdevices/d: -> /mnt/droiddeck-sd). Every stat, open and access that follows links paid one more readlinkat on the card path after the rewrite had already found the mount holds no links, and on Android's storage layer each extra lookup of a deep path costs about a millisecond. The rewrite now keeps the plain answer it already has, so the check runs only where a link can exist. * Keep the link walk when stacked mounts share the covering path * Trace readlinkat without loading the hook into strace and match the queried path