From: Theodore Ts'o Date: Mon, 24 Feb 2014 04:07:38 +0000 (-0500) Subject: Merge branch 'maint' into next X-Git-Tag: v1.43-WIP-2015-05-18~353 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fe2fsprogs.git;a=commitdiff_plain;h=3ba59bf649772967bcde59c6e1513937c2a0c835 Merge branch 'maint' into next --- 3ba59bf649772967bcde59c6e1513937c2a0c835 diff --cc e2fsck/Makefile.in index 8ca329b7e,77017efa4..c23f1cbeb --- a/e2fsck/Makefile.in +++ b/e2fsck/Makefile.in @@@ -257,11 -273,12 +257,11 @@@ uninstall $(DESTDIR)$(root_sbindir)/fsck.ext4 \ $(DESTDIR)$(root_sbindir)/fsck.ext4dev - clean: + clean:: $(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \ e2fsck.shared e2fsck.profiled flushb e2fsck.8 \ - tst_problem tst_crc32 tst_region tst_refcount gen_crc32table \ - crc32table.h e2fsck.conf.5 prof_err.c prof_err.h \ - test_profile + tst_problem tst_region tst_refcount e2fsck.conf.5 \ + prof_err.c prof_err.h test_profile $(RM) -rf profiled mostlyclean: clean diff --cc e2fsck/super.c index 8cb6b4750,81503d4b9..e9892e2db --- a/e2fsck/super.c +++ b/e2fsck/super.c @@@ -734,11 -722,13 +734,14 @@@ void check_super_block(e2fsck_t ctx #ifndef EXT2_SKIP_UUID /* * If the UUID field isn't assigned, assign it. + * Skip if checksums are enabled and the filesystem is mounted, + * if the id changes under the kernel remounting rw may fail. */ - if (!(ctx->options & E2F_OPT_READONLY) && uuid_is_null(sb->s_uuid)) { + if (!(ctx->options & E2F_OPT_READONLY) && uuid_is_null(sb->s_uuid) && + (!csum_flag || !(ctx->mount_flags & EXT2_MF_MOUNTED))) { if (fix_problem(ctx, PR_0_ADD_UUID, &pctx)) { uuid_generate(sb->s_uuid); + ext2fs_init_csum_seed(fs); fs->flags |= EXT2_FLAG_DIRTY; fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY; }