]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: don't try to set a UUID on metadata_csum file systems
authorTheodore Ts'o <tytso@mit.edu>
Sat, 16 Apr 2016 00:51:36 +0000 (20:51 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 16 Apr 2016 00:51:36 +0000 (20:51 -0400)
If the UUID field is NULL, e2fsck will try to generate and set a new
UUID.  This will cause massive problems if the metadata_csum feature
is set, so avoid doing so in that case.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/super.c

index e09c14c62658cf1bc37ec4222e56e6c888c96961..dec70bd46b012fe03e6821df322349f184d856f4 100644 (file)
@@ -756,6 +756,7 @@ void check_super_block(e2fsck_t ctx)
         * if the id changes under the kernel remounting rw may fail.
         */
        if (!(ctx->options & E2F_OPT_READONLY) && uuid_is_null(sb->s_uuid) &&
+           !ext2fs_has_feature_metadata_csum(ctx->fs->super) &&
            (!csum_flag || !(ctx->mount_flags & EXT2_MF_MOUNTED))) {
                if (fix_problem(ctx, PR_0_ADD_UUID, &pctx)) {
                        uuid_generate(sb->s_uuid);