]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
resize2fs: make minimum size estimates more reliable for mounted fs
authorJan Kara <jack@suse.cz>
Fri, 18 Oct 2019 12:50:59 +0000 (14:50 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 10 Nov 2019 13:13:53 +0000 (08:13 -0500)
commitac94445fc01f070feb31d599d6dfd5fb3d34d3ea
tree5e5d516d00ed40af8349739424cf05efce1feee7
parent04335dbf327e4ecedc882237dc491a895e171f17
resize2fs: make minimum size estimates more reliable for mounted fs

Currently, the estimate of minimum filesystem size is using free blocks
counter in the superblock. The counter generally doesn't get updated
while the filesystem is mounted and thus the estimate is very unreliable
for a mounted filesystem. For some usecases such as automated
partitioning proposal to the user it is desirable that the estimate of
minimum filesystem size is reasonably accurate even for a mounted
filesystem. So use group descriptor counters of free blocks for the
estimate of minimum filesystem size. These get updated together with
block being allocated and so the resulting estimate is more accurate.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
resize/resize2fs.c