inconsistent lock state on 2.6.30?

Christoph Hellwig hch at infradead.org
Tue Jun 23 12:08:44 CDT 2009


On Tue, Jun 23, 2009 at 09:26:04AM -0700, Sage Weil wrote:
> Hi,
> 
> I have 6 machines using an XFS volume for logs, and strangely all 6 of 
> them spit out the following at roughly the same time last night.  Most are 
> around 50% full, all with a single directory full of large append-only 
> files.  They're all running similar workloads, and are all nfs exported.
> 
> Is this a known issue?  If there's any other info that'd be helpful, let 
> me know.

> [15995.063830] inconsistent {RECLAIM_FS-ON-R} -> {IN-RECLAIM_FS-W} usage.
> [15995.063830] kswapd0/290 [HC0[0]:SC0[0]:HE1:SE1] takes:
> [15995.063830]  (&(&ip->i_lock)->mr_lock){++++-?}, at: 
> [<ffffffff803af57a>] xfs_ilock+0x5b/0x79
> [15995.063830] {RECLAIM_FS-ON-R} state was registered at:

If I understand this correctly we take a rw/semaphore in the reclaim
path, and also in a memory allocation that may call back into the fs.

I don't think the actual condition is new, but I've never seen the
warning before.  The patch below should take care of it, can you give it
a try?

Index: linux-2.6/fs/xfs/xfs_da_btree.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_da_btree.c	2009-06-23 19:04:54.640929986 +0200
+++ linux-2.6/fs/xfs/xfs_da_btree.c	2009-06-23 19:05:20.615966923 +0200
@@ -2261,9 +2261,9 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bp
 	int		off;
 
 	if (nbuf == 1)
-		dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_SLEEP);
+		dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_NOFS);
 	else
-		dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_SLEEP);
+		dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_NOFS);
 	dabuf->dirty = 0;
 #ifdef XFS_DABUF_DEBUG
 	dabuf->ra = ra;




More information about the xfs mailing list