Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b94d320b authored by Mike Lockwood's avatar Mike Lockwood
Browse files

sdcard: Fix lower case squashing for case insensitivity support.



The fuse layer in the kernel does not support case insensitive file systems.
But the sdcard daemon's fuse_lookup was returning the same file object for
different file names, which caused problems in the kernel fuse layer's dcache,
resulting in EBUSY errors if the same directory was opened twice under different
names differing only by case.

To fix this, the sdcard daemon will return different file objects for files or directories
that differ only by case. Now the squashing occurs only in the interaction between
the sdcard daemon and the underlying file system in /data/media, and sdcard maintains
the illusion for the kernel fuse layer that there are two separate files.

Example:  Suppose both /mnt/sdcard/foo.txt and /mnt/sdcard/FOO.TXT are opened.
Previously, the sdcard would squash this to a single node, and return the same
node to the kernel fuse implementation twice, and would open the underlying file
/data/media/foo.txt only once.   Now sdcard will create two separate nodes will open
/data/media/foo.txt twice, once for mnt/sdcard/foo.txt and again for /mnt/sdcard/FOO.TXT.

Change-Id: I70e36b7822142750d3eeeb75edd6464ec7c79f2a
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 4e84d3bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment