All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Bernd Schubert <bs@q-leap.de>
Cc: linux-xfs@oss.sgi.com
Subject: Re: xfs corruptions
Date: Fri, 5 Sep 2008 09:02:10 +1000	[thread overview]
Message-ID: <20080904230210.GA5991@disturbed> (raw)
In-Reply-To: <g9p4sl$smg$1@ger.gmane.org>

On Thu, Sep 04, 2008 at 07:11:48PM +0200, Bernd Schubert wrote:
> Hello,
> 
> I'm presently debugging the error handler of the MPT fusion driver and
> therefore causing errors on the disk (Infortrend scsi hardware raids).
> When I later on try to delete files and directories having been created
> before and during the failures, "rm -fr" simply says directory not empty.
> No message in dmesg about it, but xfs_repair reports errors, see below.
> Once xfs_repair has done its jobs, removing these directories works fine.
> But this shouldn't happen, should it? This is with 2.6.26

So we have an inode that is marked free in the AGI btree, but
apparently still in use according to the shortform directory that
referenced it.

There are two possibilities here:

The first possibility is the inode btree buffer containing the
record indicating the inode is free/used never got written to
disk while the other metadata blocks made it to disk. Seeing as
the filesystem didn't hang here, it implies that the buffer was
written so that on I/O completion the tail of the log could
move forward. That is, the I/O was issued, no error was reported,
but the I/O never made it to disk. If there was an error, you
should see something like:

Warning: Device <bdevname>, XFS metadata write error, block 0x456 in <bdev>

in the syslog indicating a write error. In this case it woul dbe
non-fatal and XFS would try to write it again a little later.

The second possibility is that the write of the inode containing the 
shortform directory to disk did not actually hit the disk, but that
implies unlinks had already taken place well before the 'rm -rf'
was executed. Perhaps your workload does that....

However, both cases imply that an I/O was indicated as completing
successfully when they did not get written to disk, and that points
to a bug in the error handling in the underlying driver.

That being said - it could be a bug in the XFS error handling that
is causing this, but XFS tends to be pretty noisy when errors occur.
I guess that you need to add more tracing to indicate when errors
are induced so we can check if errors are being created against
the same buffers that the inconsistent state is being found in. That
will help point out if the errors are being reported to XFS or not
correctly.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2008-09-04 23:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04 17:11 xfs corruptions Bernd Schubert
2008-09-04 23:02 ` Dave Chinner [this message]
2015-11-30 16:51 XFS corruptions Sandeep Patel
2015-11-30 17:40 ` Emmanuel Florac
2015-11-30 18:06   ` Sandeep Patel
2015-11-30 18:45     ` Emmanuel Florac
2015-12-01 12:18       ` Sandeep Patel
2015-12-01 13:50         ` Emmanuel Florac
2015-12-01 14:01           ` Sandeep Patel
2015-12-10 15:07           ` Sandeep Patel
2015-12-10 15:46             ` Emmanuel Florac
2015-12-10 19:51               ` Sandeep Patel
2016-01-11 14:20               ` Sandeep Patel
2016-01-11 15:16                 ` Emmanuel Florac
2016-03-16 13:15                   ` Sandeep Patel
2016-03-16 14:07                     ` Emmanuel Florac
2015-11-30 21:51 ` Dave Chinner
2015-11-30 22:04   ` Darrick J. Wong
2015-12-10 16:46 ` Eric Sandeen

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=20080904230210.GA5991@disturbed \
    --to=david@fromorbit.com \
    --cc=bs@q-leap.de \
    --cc=linux-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.