+2006-03-18 Theodore Ts'o <tytso@mit.edu>
+
+ * unix.c (main): If the filesystem is not mounted, open the
+ filesystem in exclusive mode (to prevent 2.6 kernels from
+ mounting the filesystem while it is being checked).
+
2006-03-10 Theodore Ts'o <tytso@mit.edu>
* e2fsck.h, journal.c (e2fsck_fix_ext3_journal_hint),
flags = 0;
if ((ctx->options & E2F_OPT_READONLY) == 0)
flags |= EXT2_FLAG_RW;
+ if ((ctx->mount_flags & EXT2_MF_MOUNTED) == 0)
+ flags |= EXT2_FLAG_EXCLUSIVE;
if (ctx->superblock && ctx->blocksize) {
retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options,
"r/o" : "r/w");
else if (retval == ENXIO)
printf(_("Possibly non-existent or swap device?\n"));
+ else if (retval == EBUSY)
+ printf(_("Filesystem mounted or opened exclusively "
+ "by another program?\n"));
#ifdef EROFS
else if (retval == EROFS)
printf(_("Disk write-protected; use the -n option "