public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alexander Beregalov <a.beregalov@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: 2.6.30-06725: xfs_fsr: Assertion failed: ip->i_delayed_blks == 0, file: fs/xfs/xfs_bmap.c, line: 5991
Date: Thu, 18 Jun 2009 16:51:02 -0400	[thread overview]
Message-ID: <20090618205102.GA5805@infradead.org> (raw)
In-Reply-To: <a4423d670906181231r7388df5am394bc55508272b3@mail.gmail.com>

Did this happens once or multiple times?  It seems that for some
reason xfs_flush_pages didn't flush all delalloc space and then
we rightfully hit this assertation.

I really hate the code in xfs_flush_pages with the optimizations it
tries to apply.  Can you give the patch below which removes the
optimizations and uses some more core VM code instead of doing our
own thing?


Index: xfs/fs/xfs/linux-2.6/xfs_fs_subr.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_fs_subr.c	2009-06-18 22:48:01.469815342 +0200
+++ xfs/fs/xfs/linux-2.6/xfs_fs_subr.c	2009-06-18 22:49:08.296815058 +0200
@@ -68,20 +68,12 @@ xfs_flush_pages(
 	uint64_t	flags,
 	int		fiopt)
 {
-	struct address_space *mapping = VFS_I(ip)->i_mapping;
-	int		ret = 0;
-	int		ret2;
+	xfs_iflags_clear(ip, XFS_ITRUNCATED);
 
-	if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
-		xfs_iflags_clear(ip, XFS_ITRUNCATED);
-		ret = -filemap_fdatawrite(mapping);
-	}
 	if (flags & XFS_B_ASYNC)
-		return ret;
-	ret2 = xfs_wait_on_pages(ip, first, last);
-	if (!ret)
-		ret = ret2;
-	return ret;
+		return -filemap_fdatawrite(VFS_I(ip)->i_mapping);
+	else
+		return -filemap_write_and_wait(VFS_I(ip)->i_mapping);
 }
 
 int

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-06-18 20:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 19:31 2.6.30-06725: xfs_fsr: Assertion failed: ip->i_delayed_blks == 0, file: fs/xfs/xfs_bmap.c, line: 5991 Alexander Beregalov
2009-06-18 20:51 ` Christoph Hellwig [this message]
2009-06-18 22:04   ` Alexander Beregalov
     [not found] <941396568.292261245481145500.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-20  7:04 ` Lachlan McIlroy
2009-06-20 18:01   ` Christoph Hellwig
2009-06-20 18:17     ` Alexander Beregalov
2009-06-23 22:51   ` Alexander Beregalov
     [not found] <175383275.303721245629906853.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-22  0:29 ` Lachlan McIlroy

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=20090618205102.GA5805@infradead.org \
    --to=hch@infradead.org \
    --cc=a.beregalov@gmail.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