OSDN Git Service

Use inode numbers for CE storage, fix sizes.
authorJeff Sharkey <jsharkey@android.com>
Mon, 11 Apr 2016 02:51:40 +0000 (20:51 -0600)
committerJeff Sharkey <jsharkey@android.com>
Mon, 11 Apr 2016 05:16:39 +0000 (23:16 -0600)
commit2f720f7ec5c9d0b91defc85878e7330b10f8e89a
treebc0eddacd84f65880b674bce350a5a4b5907c850
parentcd582bb1180543d348a5ed412a64aa181fac638f
Use inode numbers for CE storage, fix sizes.

Certain operations, such as clearing/destroying app data, or just
counting on-disk size, require us to know the CE storage directory
of a particular app.  To facilitate these operations, offer a method
to get the inode of a CE directory, and accept that inode number
for later operations.

In previous releases, we started installing apps using a new
directory-based layout, where all app code, unpacked native libraries,
and optimized code is bundled together.  So now we only have a single
path to measure for code size.

Start measuring both CE and DE storage data usage for apps, and tweak
the reporting so that empty cache/data directories actually show up
as "0 bytes".

Fix bugs in disk usage counting, since st_blksize has no bearing on
the allocated disk space.  Also don't double-count "." and ".."
directories when measuring storage.

Bug: 2782891527197819
Change-Id: I350b951f5c24165edb253ac663c9aae020c24dc9
cmds/installd/commands.cpp
cmds/installd/commands.h
cmds/installd/installd.cpp
cmds/installd/tests/installd_utils_test.cpp
cmds/installd/utils.cpp
cmds/installd/utils.h
libs/diskusage/dirsize.c