Go to file
David Anderson c25ec972c9 AOSP: e2fsdroid: Don't skip unusable blocks in BaseFS.
Currently, basefs_allocator will iterate through blocks owned by an
inode until it finds a block that is free. This effectively ignores the
logical to physical block mapping, which can lead to a bigger delta in
the final image.

An example of how this can happen is if the BaseFS has a deduplicated
block (D), that is not deduplicated in the new image:

  Old image: 1 2 3 D 4 5
  New image: 1 2 3 ? 4 5

If the allocator sees that "D" is not usable, and skips to block "4",
we will have a non-ideal assignment.

  Bad image: 1 2 3 4 5 ?

This patch refactors get_next_block() to acquire at most one block. It's
called a single time, and then only called in a loop if absolutely no
blocks can be acquired from anywhere else.

In a Virtual A/B simulation, this reduces the COW snapshot size by about
90MB.

Bug: 139201772
Test: manual test
Change-Id: I354f0dee1ee191dba0e1f90491ed591dba388f7f
From AOSP commit: a495b54f89b2ec0e46be8e3564e4852c6434687c
2020-03-20 23:18:01 -04:00
config config: update config.{guess,sub} 2020-01-01 15:16:41 -05:00
contrib AOSP: e2fsdroid: Don't skip unusable blocks in BaseFS. 2020-03-20 23:18:01 -04:00
debian debian: drop libattr1-dev from the build dependencies list 2020-03-15 01:12:44 -04:00
debugfs AOSP: Allow debugfs_static to be compiled as host tool. 2020-03-20 22:55:39 -04:00
doc Update release notes, etc., for the 1.45.5 release 2020-01-06 18:10:17 -05:00
e2fsck AOSP: Make ramdisk_available. 2020-03-20 23:11:15 -04:00
ext2ed Merge branch 'maint' into next 2017-10-15 23:20:53 -04:00
include e2fsprogs: fix Free Software Foundation address 2018-04-19 11:39:09 -04:00
install-utils Remove Changelog files since they're not used after the git migration 2007-07-08 08:50:41 -04:00
intl build: use MKDIR_P instead of MKINSTALLDIRS 2018-08-11 15:29:48 -04:00
lib AOSP: Make ramdisk_available. 2020-03-20 23:11:15 -04:00
misc AOSP: Build e2freefrag 2020-03-20 23:13:52 -04:00
po po: update ms.po (from translationproject.org) 2020-03-20 22:31:25 -04:00
resize AOSP: Allow resize2fs to compile with BUILD_HOST_static 2020-03-20 23:00:14 -04:00
scrub e2scrub, e2scrub_all: don't sleep unnecessarily in exitcode 2020-01-06 16:01:23 -05:00
tests libext2fs: make ext2fs_dirent_has_tail() more strict 2020-03-14 23:24:39 -04:00
util AOSP: Change #define to _BLKID_TYPES_H 2020-03-20 23:08:04 -04:00
.gitignore misc: add e2mmpstatus utility via dumpe2fs 2018-06-22 18:22:37 -04:00
.missing-copyright Many files: 1997-04-29 16:15:03 +00:00
.release-checklist Stop generating e2fsprogs.spec automatically 2018-08-18 11:06:23 -04:00
ABOUT-NLS Update to gettext 0.11.5. We now enable NLS support by default. 2003-05-03 16:35:17 -04:00
acinclude.m4 configure: don't fail if /usr/include/sys/mount.h does not exist 2019-11-13 13:55:29 -05:00
aclocal.m4 e2fsprogs: fix Free Software Foundation address 2018-04-19 11:39:09 -04:00
Android.bp AOSP: Turn off some more warnings on Windows. 2019-04-22 13:35:03 -04:00
CleanSpec.mk AOSP: e2fsdroid and mke2fs are dynamic executable in recovery partition 2018-06-27 23:51:40 -04:00
configure configure: don't fail if /usr/include/sys/mount.h does not exist 2019-11-13 13:55:29 -05:00
configure.ac configure: fix test where cron is not installed on a non-systemd system 2019-05-27 15:10:31 -04:00
depfix.sed Update Release Notes, Changelogs, version.h, etc. for 1.42 release 2011-11-29 16:48:14 -05:00
e2fsprogs.lsm Update release notes, etc., for the 1.45.5 release 2020-01-06 18:10:17 -05:00
e2fsprogs.spec Update release notes, etc., for the 1.45.4 release 2019-09-23 16:04:59 -04:00
INSTALL Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
INSTALL.elfbin Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
Makefile.in Merge branch 'maint' into next 2018-10-04 10:39:50 -04:00
MCONFIG.in Drop use of -pedantic when doing gcc-wall 2020-01-01 13:41:35 -05:00
NOTICE e2fsprogs: fix Free Software Foundation address 2018-04-19 11:39:09 -04:00
README Update release notes, etc., for the 1.45.5 release 2020-01-06 18:10:17 -05:00
RELEASE-NOTES Update release notes, etc., for the 1.45.5 release 2020-01-06 18:10:17 -05:00
SHLIBS Many files: 1997-04-29 16:15:03 +00:00
SUBMITTING-PATCHES Added SUBMITTING-PATCHES file 2005-07-05 22:30:13 -05:00
version.h Update release notes, etc., for the 1.45.5 release 2020-01-06 18:10:17 -05:00
wordwrap.pl Fix wordwrap.pl so it is more portable 2012-09-21 12:50:04 -04:00

	This is the new version (1.45.5) of the second extended file
system management programs.

	From time to time, I release new versions of e2fsprogs, to fix
bugs and to make the utilities more robust.  You can always find
information about the latest version at the the e2fsprogs web page,
which is:

	http://e2fsprogs.sourceforge.net

	The INSTALL file has instructions on building and installing
e2fsprogs.  Provisions for building Red Hat RPMs and Debian dpkg files
are supplied as well.

	In case of bugs in these programs, please contact Ted Ts'o at
tytso@mit.edu or tytso@alum.mit.edu.  See the e2fsck man page for
suggestions of what sort of information to include when submitting bug
reports for these programs.