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

On Tue, Aug 26, 2008 at 03:27:43PM -0600, Andreas Dilger wrote:
> 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.

Ah, I see.  So the main thing that you are trying to achieve with the
patch is avoid the non-zero exit from fsck, right?

I guess I'm really not that happy with letting the filesystem getting
marked as "valid" if the user refuses to fix the free blocks/inode
count summary when the -n flag isn't getting set.  And technically, if
the summary statistics are wrong, the filesystem is not actually
valid, which is what an exit code of 4, right?

It seems like the much more "correct" solution, which would actually
be more code, but would also be useful when a user wants to check a
filesystem without actually changing *anything*, including running the
journal, would be to create an I/O manager which reads in the journal
into memory, and creates a "override map" data structure such that
when e2fsck tries to read from a block which is in the journal, that
the (read-only) I/O manager read the block in the journal instead of
from the disk.  (Of course it will need to respect the revoke records,
too!)

Once we have this I/O manager, I think e2fsck should use it by default
with the -n option, so that we can correctly check the filesystem, and
**not** modify the device at all.  This would also give you the exit
status of 0 for quiscent filesystems, as you would wish.  Debugfs
could also have an option to use this I/O manager to read in the
journal.

						- Ted

  reply	other threads:[~2008-08-27  0:25 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
2008-08-27  0:25     ` Theodore Tso [this message]
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=20080827002516.GC29936@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    /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.