Whamcloud - gitweb
tune2fs: prevent changing UUID of fs with stable_inodes feature
authorEric Biggers <ebiggers@google.com>
Wed, 1 Apr 2020 20:32:36 +0000 (13:32 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 10 Apr 2020 15:23:12 +0000 (11:23 -0400)
commitb88883f78755f8bb4fdd8b060e82a253f21e2dfa
treeae35010586e3bb2585746d76a67fd619df5e9858
parentaf7293fe8a6d7b9af70f90b1ccdc91a0e2fec7f8
tune2fs: prevent changing UUID of fs with stable_inodes feature

The stable_inodes feature is intended to indicate that it's safe to use
IV_INO_LBLK_64 encryption policies, where the encryption depends on the
inode numbers and thus filesystem shrinking is not allowed.  However
since inode numbers are not unique across filesystems, the encryption
also depends on the filesystem UUID, and I missed that there is a
supported way to change the filesystem UUID (tune2fs -U).

So, make 'tune2fs -U' report an error if stable_inodes is set.

We could add a separate stable_uuid feature flag, but it seems unlikely
it would be useful enough on its own to warrant another flag.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c