From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] xfs: btree block LSN escaping to disk uninitialised
Date: Wed, 28 Aug 2013 15:31:09 -0500 [thread overview]
Message-ID: <521E5E0D.4000606@sgi.com> (raw)
In-Reply-To: <1377688967-6480-2-git-send-email-david@fromorbit.com>
On 08/28/13 06:22, Dave Chinner wrote:
> From: Dave Chinner<dchinner@redhat.com>
>
> When testing LSN ordering code for v5 superblocks, it was discovered
> that the the LSN embedded in the generic btree blocks was
> occasionally uninitialised. These values didn't get written to disk
> by metadata writeback - they got written by previous transactions in
> log recovery.
>
> The issue is here that the when the block is first allocated and
> initialised, the LSN field was not initialised - it gets overwritten
> before IO is issued on the buffer - but the value that is logged by
> transactions that modify the header before it is written to disk
> (and initialised) contain garbage. Hence the first recovery of the
> buffer will stamp garbage into the LSN field, and that can cause
> subsequent transactions to not replay correctly.
>
> The fix is simply to initialise the bb_lsn field to zero when we
> initialise the block for the first time.
>
> Signed-off-by: Dave Chinner<dchinner@redhat.com>
> ---
This is simple enough that it could have been put into the second patch.
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-08-28 20:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 11:22 [PATCH 0/2] xfs: prevent transient corrupt states during log recovery Dave Chinner
2013-08-28 11:22 ` [PATCH 1/2] xfs: btree block LSN escaping to disk uninitialised Dave Chinner
2013-08-28 20:31 ` Mark Tinguely [this message]
2013-08-28 20:57 ` Dave Chinner
2013-08-30 18:41 ` Ben Myers
2013-08-28 11:22 ` [PATCH 2/2] xfs: check LSN ordering for v5 superblocks during recovery Dave Chinner
2013-08-28 20:49 ` Mark Tinguely
2013-08-28 21:02 ` Dave Chinner
2013-08-28 21:07 ` Mark Tinguely
2013-08-28 21:31 ` Dave Chinner
2013-08-28 21:43 ` Mark Tinguely
2013-08-28 22:34 ` Dave Chinner
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=521E5E0D.4000606@sgi.com \
--to=tinguely@sgi.com \
--cc=david@fromorbit.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 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.