]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
tune2fs: prohibit toggling uninit_bg on live filesystems
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 20 Nov 2019 19:32:55 +0000 (11:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 21 Nov 2019 03:58:55 +0000 (22:58 -0500)
commit3f21d8239567e890b4c41cd69a617ba10cd98f75
tree543e68c6904be0c63c4f76bfd1ee4891a7bc6bf0
parent446483e39862d57717fe89190d502bbba0371147
tune2fs: prohibit toggling uninit_bg on live filesystems

An internal customer followed an erroneous AskUbuntu article[1] to try to
change the UUID of a live ext4 filesystem.  The article claims that you
can work around tune2fs' "cannot change UUID on live fs" error by
disabling uninit_bg, changing the UUID, and re-enabling the feature.

This led to metadata corruption because tune2fs' journal descriptor
rewrite races with regular filesystem writes.  Therefore, prevent
administrators from turning on or off uninit_bg on a mounted fs.

[1] https://askubuntu.com/questions/132079/how-do-i-change-uuid-of-a-disk-to-whatever-i-want/195839#459097

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c