| To: | Mikulas Patocka <mpatocka@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx |
|---|---|
| Subject: | Re: spurious -ENOSPC on XFS |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Thu, 22 Jan 2009 15:59:13 -0500 |
| In-reply-to: | <20090120232422.GF10158@disturbed> |
| References: | <Pine.LNX.4.64.0901120509550.11089@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090113214949.GN8071@disturbed> <Pine.LNX.4.64.0901132324070.16396@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090118173144.GA1999@xxxxxxxxxxxxx> <Pine.LNX.4.64.0901201430250.4603@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090120232422.GF10158@disturbed> |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
On Wed, Jan 21, 2009 at 10:24:22AM +1100, Dave Chinner wrote:
> Right, so you need to use internal xfs sync functions that don't
> have these problems. That is:
>
> error = xfs_sync_inodes(ip->i_mount, SYNC_DELWRI|SYNC_WAIT);
>
> will do a blocking flush of all the inodes without deadlocks occurring.
> Then you can remove the 500ms wait.
I've given this a try with Eric's testcase from #724 in the oss bugzilla,
but it's not enough yet. I thinks that's because SYNC_WAIT is rather
meaningless for data writeout, and we need SYNC_IOWAIT instead. The
patch below gets the testcase working for me:
Index: linux-2.6/fs/xfs/linux-2.6/xfs_sync.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-01-22 06:29:30.646141628
+0100
+++ linux-2.6/fs/xfs/linux-2.6/xfs_sync.c 2009-01-22 21:57:53.073864570
+0100
@@ -446,7 +446,9 @@ xfs_flush_device_work(
void *arg)
{
struct inode *inode = arg;
- sync_blockdev(mp->m_super->s_bdev);
+
+ xfs_sync_inodes(mp, SYNC_DELWRI);
+ xfs_sync_inodes(mp, SYNC_DELWRI | SYNC_IOWAIT);
iput(inode);
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 20/20] xfsprogs: resync libxfs with the kernel code, Christoph Hellwig |
|---|---|
| Next by Date: | XFS status update for December 2008, Christoph Hellwig |
| Previous by Thread: | Re: spurious -ENOSPC on XFS, Dave Chinner |
| Next by Thread: | Re: spurious -ENOSPC on XFS, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |