Whamcloud - gitweb
tune2fs: update overhead when toggling journal feature
authorJan Kara <jack@suse.cz>
Mon, 14 Jun 2021 21:28:30 +0000 (23:28 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 6 Jul 2021 23:55:09 +0000 (19:55 -0400)
commit0af9a7e9dc0f0ff1b55058dfdad349db09c5d150
tree84afb5b955625f78a3db794f9bc9e713f6af4710
parent2c69c94217b6db083d601d4fd62d6ab6c1628fee
tune2fs: update overhead when toggling journal feature

When adding or removing journal from a filesystem, we also need to add /
remove journal blocks from overhead stored in the superblock.  Otherwise
total number of blocks in the filesystem as reported by statfs(2) need
not match reality and could lead to odd results like negative number of
used blocks reported by df(1).

Fixes: 9046b4dfd0ce ("mke2fs: set overhead in super block")
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c