xfs
[Top] [All Lists]

Re: 2.6.31 xfs_fs_destroy_inode: cannot reclaim

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: 2.6.31 xfs_fs_destroy_inode: cannot reclaim
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 19 Oct 2009 12:16:00 +1100
Cc: Patrick Schreurs <patrick@xxxxxxxxxxxxxxxx>, Tommy van Leeuwen <tommy@xxxxxxxxxxxxxxxx>, Bas Couwenberg <bas@xxxxxxxxxxxxxxxx>, XFS List <xfs@xxxxxxxxxxx>
In-reply-to: <20091012233854.GA29446@xxxxxxxxxxxxx>
References: <20090930124104.GA7463@xxxxxxxxxxxxx> <4AC60D27.9060703@xxxxxxxxxxxxxxxx> <20091005214348.GA15448@xxxxxxxxxxxxx> <4ACB080D.3010708@xxxxxxxxxxxxxxxx> <20091007011926.GB32032@xxxxxxxxxxxxx> <4AD18C8D.90808@xxxxxxxxxxxxxxxx> <20091012233854.GA29446@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Oct 12, 2009 at 07:38:54PM -0400, Christoph Hellwig wrote:
> On Sun, Oct 11, 2009 at 09:43:09AM +0200, Patrick Schreurs wrote:
> > Hello Christoph,
> >
> > Attached you'll find a screenshot from a 2.6.31.3 server, which includes  
> > your patches and has XFS_DEBUG turned on. I truly hope this is useful to  
> > you.
> 
> Thanks.  The patch below should fix the inode reclaim race that could
> lead to the double free you're seeing.  To be applied ontop of all
> the other patches I sent you.
> 
> Index: xfs/fs/xfs/linux-2.6/xfs_sync.c
> ===================================================================
> --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c      2009-10-11 19:09:43.828254119 
> +0200
> +++ xfs/fs/xfs/linux-2.6/xfs_sync.c   2009-10-12 13:48:14.886006087 +0200
> @@ -670,22 +670,22 @@ xfs_reclaim_inode(
>  {
>       xfs_perag_t     *pag = xfs_get_perag(ip->i_mount, ip->i_ino);
>  
> -     /* The hash lock here protects a thread in xfs_iget_core from
> -      * racing with us on linking the inode back with a vnode.
> -      * Once we have the XFS_IRECLAIM flag set it will not touch
> -      * us.
> +     /*
> +      * The hash lock here protects a thread in xfs_iget from racing with
> +      * us on recycling the inode.  Once we have the XFS_IRECLAIM flag set
> +      * it will not touch it.
>        */
> -     write_lock(&pag->pag_ici_lock);

Did you mean to remove this write_lock? The patch does not remove
the unlocks....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>