Issue metadata
Sign in to add a comment
|
cryptohome: migrate from using xattr to identify pass through directories. |
||||||||||||||||||||||||
Issue descriptionin recent design, new pass-thru directories use extended attributes to be located: user/GCache/v1/files: user.GCacheFiles root/android-data/data/data/ : user.AndroidCache See https://docs.google.com/document/d/1Kdq-b5kpudbotQ1q2GRNd52f-oZUrf7mfuZb1XUqH4U/edit#heading=h.sa3sh9r88p48 and go/arc-disk-full-design Instead, ecyptfs has been designed with a pass-thru directory feature, adapted to ext4 crypto. If the directory is created in the fault, it appears as-is in the mount. In the current code, when we want to create a pass-thru directory in vault/ but a directory with the same name exists in mount/, we forcibly remove it, we don't have to. To do the migration: 1 - be sure the directory to migrate away from xattr is in kTrackedDirs local variable of Mount::CreateTrackedSubdirectories() 2 - if mount/ directory exists 2.1 if no xattr, remove 2.2 if xattr 2.2.1 if ext4 crypto: 2.2.1.1. Do not remove/recreate, just get the inode number of future reference 2.2.2 if ecryptfs: 2.2.2.1: in the parent vault directory, look for the directory with the same xattr. 2.2.2.2 rename found directory to passthru name 2.2.3 remove xattr
,
Mar 27 2018
,
Apr 2 2018
FYI Android switched to using "gid" to mark cache directories, which is less expensive to read (and track through quota).
,
Apr 3 2018
,
Apr 3 2018
,
Apr 3 2018
Is this really a casting issue? Internals>Cast>FileManager is for casting from the files app on CrOS, but I don't see how this issue relates?
,
Apr 4 2018
I think it should be Platform>Apps>FileManager.
,
Apr 4 2018
Sorry, my mistake. Platform>Apps>FileManager it is.
,
Apr 16 2018
gwendal@, is this issue still applicable? Do we need to migrate root/android-data/data/data/ to use xattr (so cryptohomed doesn't erase it in low-disk-space scenarios, but sees it as 'pinned')?
,
Apr 16 2018
Currently for android root/android-data/data/data/*/cache are marked with const char kAndroidCacheInodeAttribute[] = "user.inode_cache"; to mark them as deletable. In the new scheme of things since Android O, caches are marked with cache gids which are cheaper to scan than xattrs (because of where they are stored). The original description of this bug is somewhat obsolete and unrelated at this point.
,
Apr 17 2018
thank you for explaining this! could you describe the problem at present so I can file a new task? I guess, we should support Ext4-quota management and gids to clear arc++ caches for logged-out users properly.
,
Apr 17 2018
Action plan would be something like - migrate to use ext4 quota to track storage usage per cache type. - migrate existing files and codebase to use gid (or project?) instead of xattr to track cache type to take advantage of ext4 quota features. - remove the xattr scanning code path from cache management as a final cleanup step.
,
Apr 17 2018
Closing this issue in favor of the 833730 (per comment #10)
,
Apr 17 2018
Note: We might need to backport any kernel patches for Ext4 quota. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by gwendal@chromium.org
, Jul 5 2016