All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Theodore Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] e2fsck shouln't consider superblock summaries as fatal
Date: Tue, 26 Aug 2008 15:27:43 -0600	[thread overview]
Message-ID: <20080826212743.GP3392@webber.adilger.int> (raw)
In-Reply-To: <20080826170420.GE8720@mit.edu>

On Aug 26, 2008  13:04 -0400, Theodore Ts'o wrote:
> On Tue, Aug 26, 2008 at 04:45:02AM -0600, Andreas Dilger wrote:
> > Running e2fsck on a quiescent (but mounted) filesystem fails in the
> > common case where the superblock inode and block count summaries are
> > wrong.  The kernel doesn't update these values except at unmount time.
> > If there are other errors in the filesystem then they will already
> > cause e2fsck to consider the filesystem invalid, so these minor errors
> > should not.
> 
> Sure, but *when* would it ever be safe to run e2fsck without -n on a
> mounted filesystem?  What's the scenario where this would matter?  And
> on an unmounted filesystem, if the block counts are wrong, and the
> user refuses to fix them the filesystem technically really isn't 100%
> valid.

I mean that this is for "e2fsck -fn".  In that case the filesystem isn't
changed, and is often completely clean except the superblock counters.
Until we have block-device freeze ioctl widely available (or convince
users to use LVM), the best we can do is quiesce Lustre IO without
unmounting the filesystem.


Without patch:

# e2fsck -fn /dev/hda3
e2fsck 1.40.7.sun1 (28-Feb-2008)
Warning!  /dev/hda3 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (213908, counted=213298).
Fix? no

Free inodes count wrong (249992, counted=249282).
Fix? no

lustre-MDT0000: ********** WARNING: Filesystem still has errors **********

lustre-MDT0000: 56/250048 files (17.9% non-contiguous), 36092/250000 blocks

# echo $?
4

With patch:

# e2fsck -fn /dev/hda3
e2fsck 1.40.11.sun1 (17-June-2008)
Warning!  /dev/hda3 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (213908, counted=213298).
Fix? no

Free inodes count wrong (249992, counted=249282).
Fix? no

lustre-MDT0000: 56/250048 files (17.9% non-contiguous), 36092/250000 blocks
# echo $?
0

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


  reply	other threads:[~2008-08-26 21:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 10:45 [PATCH] e2fsck shouln't consider superblock summaries as fatal Andreas Dilger
2008-08-26 14:58 ` Eric Sandeen
2008-08-26 17:04 ` Theodore Tso
2008-08-26 21:27   ` Andreas Dilger [this message]
2008-08-27  0:25     ` Theodore Tso
2008-08-27  7:32       ` Andreas Dilger
2008-08-27 13:44         ` Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080826212743.GP3392@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.