xfs
[Top] [All Lists]

Re: xfs_iunlink_remove: xfs_inotobp() returned error 22 -- debugging

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: xfs_iunlink_remove: xfs_inotobp() returned error 22 -- debugging
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 23 Apr 2013 10:08:35 +1000
Cc: Brian Foster <bfoster@xxxxxxxxxx>, yongtaofu@xxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <517596BA.3060408@xxxxxxxxxxx>
References: <516C89DF.4070904@xxxxxxxxxx> <517596BA.3060408@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Apr 22, 2013 at 02:59:54PM -0500, Eric Sandeen wrote:
> On 4/15/13 6:14 PM, Brian Foster wrote:
> > Hi,
> > 
> > Thanks for the data in the previous thread:
> > 
> > http://oss.sgi.com/archives/xfs/2013-04/msg00327.html
> > 
> > I'm spinning off a new thread specifically for this because the original
> > thread is already too large and scattered to track. As Eric stated,
> > please try to keep data contained in as few messages as possible.
> > 
> 
> Well, it's always simple in the end.  It just took a lot of debugging
> to figure out what was happening - we do appreciate your help with that!
> 
> We were able to create a local reproducer, and it looks like
> this patch fixes things:
> 
> commit aae8a97d3ec30788790d1720b71d76fd8eb44b73
> Author: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
> Date:   Sat Jan 29 18:43:27 2011 +0530
> 
>     fs: Don't allow to create hardlink for deleted file

Good find Eric - great work on the reproducer script.

FWIW, can you confirm that a debug kernel assert fails
with a non-zero link count in xfs_bumplink() with your test case?

int
xfs_bumplink(
        xfs_trans_t *tp,
        xfs_inode_t *ip)
{
        xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG);

>>>>>   ASSERT(ip->i_d.di_nlink > 0);
        ip->i_d.di_nlink++;
        inc_nlink(VFS_I(ip));

If it does, we should consider this a in-memory corruption case and
return and trigger a shutdown here....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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