From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: fix the xfs_iflush_done callback search
Date: Thu, 02 Oct 2014 08:27:55 -0500 [thread overview]
Message-ID: <542D52DB.6090709@sgi.com> (raw)
In-Reply-To: <20141001223456.GV4758@dastard>
On 10/01/14 17:34, Dave Chinner wrote:
> On Wed, Oct 01, 2014 at 04:18:02PM -0500, Mark Tinguely wrote:
>> Commit "xfs: remove all the inodes on a buffer from the AIL in bulk"
>> made the xfs inode flush callback more efficient by combining all
>> the inode writes on the buffer and the deletions of the inode log
>> item from AIL.
>>
>> The initial loop in this patch should be looping through all
>> the log items on the buffer to see which items have
>> xfs_iflush_done as their callback function. But currently,
>> only the log item passed to the function has its callback
>> compared to xfs_iflush_done. If the log item pointer passed to
>> the function does have the xfs_iflush_done callback function,
>> then all the log items on the buffer are removed from the
>> li_bio_list on the buffer b_fspriv and could be removed from
>> the AIL eventhough they may have not been written yet.
>
> Looks like a bug, but what I don't know from this description is
> the symptoms and impact of this bug being hit? Is there a risk of
> filesystem corruption on crash or power loss? Perhaps it's a data
> loss issue? I can't tell, and for anyone scanning the commit logs to
> determine if they need to backport the fix will be asking the same
> questions.
>
> Also, is there a reproducable test case for it?
I was looking in this code for a way an inode could be removed from the
AIL but not written to disk.
I have a metadata dump that shows a truncate on two inodes just before a
clean unmount. The free space btrees are updated but neither inode has
been updated. A clean shutdown will wait until the AIL is empty, so
something removed the inode from the AIL but did not write the latest
changes to disk. Yes, there were earlier changes to inode/chunk in
previous pushes. This results in the blocks being both free and
allocated....if we are lucky, we get a XFS_WANT_CORRUPTED_GOTO forced
shutdowns because of partial frees in xfs_free_ag_extent(). Most of the
time it is reallocated and that leads to all kinds of data/metadata
corruption.
I tried to recreate the problem with truncates on files while unmounting
but have not gotten the correct combination. I have been chasing the
ghost of the duplicate allocation corruption problem for months and I
did not want to over state my beliefs until I could replicate the problem.
I would advise an xfs_repair in addition to the patch, the corruption
could have happened a long time ago and could be waiting to trigger.
--Mark.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-10-02 13:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 21:18 [PATCH] xfs: fix the xfs_iflush_done callback search Mark Tinguely
2014-10-01 22:34 ` Dave Chinner
2014-10-02 13:27 ` Mark Tinguely [this message]
2014-10-02 22:59 ` 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=542D52DB.6090709@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox