From: Lachlan McIlroy <lachlan@sgi.com>
To: Timothy Shimmin <tes@sgi.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, xfs@oss.sgi.com
Subject: Re: [GIT PULL] XFS update for 2.6.23 - revert a commit
Date: Tue, 02 Oct 2007 17:03:45 +1000 [thread overview]
Message-ID: <4701ED51.8050706@sgi.com> (raw)
In-Reply-To: <4701A1D0.5010709@sgi.com>
Timothy Shimmin wrote:
> Eric Sandeen wrote:
>> Tim Shimmin wrote:
>>> Hi Linus,
>>>
>>> A problem has been found for the XFS commit
>>> b394e43e995d08821588a22561c6a71a63b4ff27
>>> and it needs to be reverted.
>>> It has the potential for worse corruption than what it is meant to fix.
>>
>>
>> Whoops... that's what I get for picking it up too soon for fedora I
>> guess!
>>
>> Any background on the newly-found problem, for those of us in the peanut
>> gallery?
>>
>> Thanks,
>>
>> -Eric
>
> Hi Eric,
>
> Lachlan worked this problem so he can probably provide more details.
> My understanding is that we were having a problem with the log replay
> replaying newly allocated inodes (inodes from buffer items) over the top
> of buffers which were actually more up-to-date than what was logged.
> The code used a heuristic to determine if the buffer had been written
> to for the inode (by checking on magic#, mode and gen# - not going to
> comment on this).
> Anyway, it comes down to either copying over the inode buf data or not
> copying it over (doing or not doing the log replay).
> The change could cause the buffer to be not overwritten in replay
> where previously it would be.
> We want this to not happen as part of the fix and doing the right thing
> and not by mistake and failing to replay when we need it to be replayed.
> I presume the latter is what is happening.
> The symptoms of this is what Lachlan has discovered in QA on a debug
> kernel and he can provide the details.
>
> I believe this started from not logging the inode size changes
> (as is consistent with the logging model) for performance reasons,
> and so we can't rely on inode log items coming up on log replay
> to fix things up.
>
> BTW, we currently have 3 ways of logging an inode:
> 1. in an item buffer and marked as an inode
> 2. in an item buffer and not marked as an inode
> 3. in an inode item
>
> and 3 places where they get replayed:
> 1. xlog_recover_do_inode_buffer - for di_next_unlinked pointer recovery
> 2. xlog_recover_do_reg_buffer - for newly allocated inode recovery
> 3. xlog_recover_do_inode_trans - for general inode recovery
>
> The fix was in #2.
>
>
> Ughh.
Yeah that about sums it up. In an attempt to prevent log replay of inodes
in cases when we shouldn't replay we also prevented log replay of inodes in
cases when we should replay. We end up with directories that refer to inodes
that were not replayed and we read existing data off disk. That existing
data is usually previous instances of inodes. We had cases of regular files
turning into directories and inode version mismatches.
Lachlan
next prev parent reply other threads:[~2007-10-02 6:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 7:23 [GIT PULL] XFS update for 2.6.23 - revert a commit Tim Shimmin
2007-10-01 12:55 ` Eric Sandeen
2007-10-01 13:05 ` Eric Sandeen
2007-10-01 13:12 ` Eric Sandeen
2007-10-02 1:41 ` Timothy Shimmin
2007-10-02 7:03 ` Lachlan McIlroy [this message]
2007-10-02 8:43 ` Justin Piszcz
2007-10-03 1:49 ` Timothy Shimmin
2007-10-03 8:11 ` Justin Piszcz
2007-10-04 0:26 ` David Chinner
2007-10-04 10:59 ` Justin Piszcz
2007-10-02 9:36 ` David Chinner
2007-10-01 15:02 ` Linus Torvalds
2007-10-02 0:13 ` Timothy Shimmin
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=4701ED51.8050706@sgi.com \
--to=lachlan@sgi.com \
--cc=sandeen@sandeen.net \
--cc=tes@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