public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Timothy Shimmin <tes@sgi.com>
To: "Jonathan C. Detert" <Jonathan.Detert@msoe.edu>
Cc: David Chinner <dgc@sgi.com>, xfs@oss.sgi.com
Subject: Re: mount prob: "log inconsistent or not a log"
Date: Fri, 21 Dec 2007 11:47:37 +1100	[thread overview]
Message-ID: <476B0D29.4050504@sgi.com> (raw)
In-Reply-To: <20071220175512.GA6023@msoe.edu>

Jonathan C. Detert wrote:
> 
> I just want to clarify - I mean to ask:
> 
> 	Is it possible that an xfs filesystem which is in use by an o.s.,
> 	last mounted by the o.s. months ago, could have a corrupted log, and
> 	yet keep functioning until such time as a remount of it is attempted?
> 
Yes.
The log is read on every mount. I don't believe we read it otherwise.
On a mount we look for the log head and an unmount record etc. to decide
whether to do a replay or not.
So it could be corrupted and we would not know and we don't really care
until the next mount.
However, if we are modifying metadata in the filesystem (with some exceptions)
then we will be continuing to write to the log and we will continue to
wrap the log. And hence if someone corrupted the log at a point in the past,
we may very well be able to overwrite the log and effectively lose that
corruption.

Do you understand the basic idea?
We just write to the log while the file-system is mounted and we are writing
to the filesystem (particularly changing metadata); and
we read from the log during (just prior) mounting of the filesystem.

> 	I.e. if a log gets corrupted while the f.s. is in use, will anyone
> 	notice, until such time as an attempt to remount the f.s. is made?
No I don't think anyone will notice.
No-one has cause to read it, so noone cares.

If you unmount it cleanly. Run repair on it before mounting it again.
Then repair may find corruption when it tries to find the log head etc...
to work out if the log is clean or not.
i.e. in this case repair will try to read the log before you've tried
to do a mount.

--Tim

  reply	other threads:[~2007-12-21  0:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20  0:01 mount prob: "log inconsistent or not a log" Jonathan.Detert
2007-12-20  0:53 ` Timothy Shimmin
2007-12-20  1:16   ` Jonathan C. Detert
2007-12-20  4:44     ` Timothy Shimmin
2007-12-20  5:04       ` Jonathan C. Detert
2007-12-20  5:45         ` Timothy Shimmin
2007-12-20 19:54         ` Jonathan C. Detert
2007-12-20  1:18   ` Jonathan C. Detert
2007-12-20  1:54     ` David Chinner
2007-12-20  2:44       ` Jonathan C. Detert
2007-12-20 17:55         ` Jonathan C. Detert
2007-12-21  0:47           ` Timothy Shimmin [this message]
2007-12-21  1:55             ` Jonathan C. Detert
2007-12-21  6:40               ` Timothy Shimmin
2007-12-21 23:19                 ` Jonathan C. Detert

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=476B0D29.4050504@sgi.com \
    --to=tes@sgi.com \
    --cc=Jonathan.Detert@msoe.edu \
    --cc=dgc@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox