Encryptedstore: allow discard for freed sectors

Allow discard from both the mounted ext4 filesystem & the devicemapper
target. This allows discard commands to be forwarded to underlying
virtio-blk device resulting in punching holes in the backing sparse disk
img. This is how recompaction is achieved when encryptedstore usage
decreases.

Test: Start udroid VM &&
  Find the underlying block device (ls -l/dev/block/mapper/cryptdev) &&
  ensure /sys/block/dm-3/queue/discard_max_byte > 0 (2199023255040)

Test: Fill up the encryptedstore & then empty it, observe the size of
backing img. Ensure it decreases.
Bug: 391340596

Change-Id: I17e278fac82c07ec41fa55ee0b65924b9ea1ea6f
1 file changed
tree: 235490eacfa669c56787962b7caad4aa2d58aae5
  1. android/
  2. build/
  3. docs/
  4. guest/
  5. libs/
  6. microfuchsia/
  7. tests/
  8. .clang-format
  9. .gitignore
  10. Android.bp
  11. dice_for_avf_guest.cddl
  12. OWNERS
  13. PREUPLOAD.cfg
  14. README.md
  15. rustfmt.toml
  16. TEST_MAPPING
README.md

Android Virtualization Framework (AVF)

Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.

Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.

If you want a quick start, see the getting started guideline and follow the steps there.

For in-depth explanations about individual topics and components, visit the following links.

AVF components:

AVF APIs:

How-Tos: