public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lachlan McIlroy <lachlan@sgi.com>
To: Mikael Abrahamsson <swmike@swm.pp.se>
Cc: Dave Chinner <david@fromorbit.com>,
	linux-kernel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: xfs bug in 2.6.26-rc9
Date: Mon, 14 Jul 2008 17:34:51 +1000	[thread overview]
Message-ID: <487B019B.9090401@sgi.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0807111215040.30192@uplift.swm.pp.se>

Mikael Abrahamsson wrote:
> On Fri, 11 Jul 2008, Dave Chinner wrote:
> 
>> That aside, what was the assert failure reported prior to the oops? 
>> i.e. paste the lines in the log before the ---[ cut here ]--- line? 
>> One of them will start with 'Assertion failed:', I think....
> 
> These ones?
> 
> Jul  8 04:44:56 via kernel: [554197.888008] Assertion failed: whichfork 
> == XFS_ATTR_FORK || ip->i_delayed_blks == 0, file: fs/xfs/xfs_bmap.c, 
> line: 5879
> Jul  9 03:25:21 via kernel: [42940.748007] Assertion failed: whichfork 
> == XFS_ATTR_FORK || ip->i_delayed_blks == 0, file: fs/xfs/xfs_bmap.c, 
> line: 5879

	xfs_ilock(ip, XFS_IOLOCK_SHARED);

	if (whichfork == XFS_DATA_FORK &&
		(ip->i_delayed_blks || ip->i_size > ip->i_d.di_size)) {
		/* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */
		error = xfs_flush_pages(ip, (xfs_off_t)0,
					       -1, 0, FI_REMAPF);
		if (error) {
			xfs_iunlock(ip, XFS_IOLOCK_SHARED);
		return error;
		}
	}

	ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0);

This is a race between xfs_fsr and a mmap write.  xfs_fsr acquires the
iolock and then flushes the file and because it has the iolock it doesn't
expect any new delayed allocations to occur.  A mmap write can allocate
delayed allocations without acquiring the iolock so is able to get in
after the flush but before the ASSERT.

> 
> I'll happily rebuild the kernel without the debug option and do 
> xfs_check to weed out any possible logical problem with the volume, if 
> you don't need any further information from the current state of my volume.
> 
> I should also say that this assert failue happened two nights in a row 
> so I guess it's fairly reproducible (didn't happen on the 10th, and 
> today, the 11th it seems to have panic:ed around 03:30 (I start the 
> defragmentation via cron at 03:00) which I think is related.
> 

  parent reply	other threads:[~2008-07-14  7:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11  7:46 xfs bug in 2.6.26-rc9 Mikael Abrahamsson
2008-07-11  8:42 ` Dave Chinner
2008-07-11 10:21   ` Mikael Abrahamsson
2008-07-14  7:30     ` Dave Chinner
2008-07-14  8:16       ` Mikael Abrahamsson
2008-07-14  7:34     ` Lachlan McIlroy [this message]
2008-07-14 12:13       ` Dave Chinner
2008-07-15  2:12         ` Lachlan McIlroy
2008-07-15  3:18           ` Dave Chinner
2008-07-15  6:17         ` Nick Piggin
2008-07-15 12:22           ` Christoph Hellwig
2008-07-16  4:12             ` Nick Piggin
2008-07-11 19:02   ` Sebastian Siewior
2008-07-11 19:52     ` Eric Sandeen
2008-07-11 23:22     ` Dave Chinner
2008-07-12  5:06       ` Sebastian Siewior

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=487B019B.9090401@sgi.com \
    --to=lachlan@sgi.com \
    --cc=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swmike@swm.pp.se \
    --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