Skip to content
Commit e41b029d authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Release cblocks back to the free pool

Modern f2fs implementations starting in S support compression
natively within the file system. The data blocks of specific
installation artifacts [eg. .apk, .so, ...] can be compressed
at the file system level, making them look and act like any
other uncompressed file, but consuming a fraction of the space.

However, the unused space is not free'd automatically. Instead,
we must manually tell the file system to release the extra
blocks [the delta between the compressed and uncompressed block
counts] back to the free pool.

Because of how compression works within the file system, once
the blocks have been released, the file becomes read-only and
cannot be modified until the free'd blocks have again been
reserved from the free pool. For these installation artifacts,
that is not a concern.

Test: atest CtsAppSecurityHostTestCases:SplitTests
Test: atest CtsAppSecurityHostTestCases:IsolatedSplitsTests
Test: atest CtsAppSecurityHostTestCases:PkgInstallSignatureVerificationTest
Test: atest CtsLibnativehelperTestCases
Test: atest PackageManagerTests
Test: Manual. Boot the device and see cblocks for stub APKs are released
Test: Manual. Disable and re-enable stub APK and see cblocks are released
Bug: 188928405
Change-Id: I4b29dab263d02a79d7b1593d35ae28101d33679a
parent ee4d86d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment