Whamcloud - gitweb
AOSP: e2fsdroid: Properly free the dedup block map.
authorDavid Anderson <dvander@google.com>
Wed, 29 Jan 2020 23:31:14 +0000 (15:31 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 21 Mar 2020 03:15:01 +0000 (23:15 -0400)
commitc2481ace20e3bae25258db30529a446e83f28c89
tree3f37e4541df0d1c84f190fc34acfca11785a32b6
parentd4197585fac5d469693c32dd88f03d84a5ef62fc
AOSP: e2fsdroid: Properly free the dedup block map.

When BaseFS specifies the same block for two files, it gets added to a
separate "dedup" bitmap, and removed from the free block bitmap. If the
new build does not use every block in this bitmap, there will be an
inconsistency: the block bitmap marks blocks as in-use when they are
actually free. Although this doesn't matter for AOSP's read-only file
systems, it does cause e2fsck to complain, which breaks the build.

Fix the inconsistency by properly freeing all unused blocks within the
dedup block set.

Bug: 139201772
Test: build AOSP using BaseFS
Change-Id: I6b6511eb713a56fec932f1d5668f1766d64d9479
From AOSP commit: 346bee6f8b97aefe7714688f738606c116099fbc
contrib/android/basefs_allocator.c