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: 符永涛 <yongtaofu@xxxxxxxxx>
Date: Tue, 23 Apr 2013 09:31:01 +0800
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, Brian Foster <bfoster@xxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=l4u38efhVZrI+yi/oRDdL9eGCtaVtV+4Gt7Az8DYsUY=; b=ob/LnBFSQcHAH2sA+0Hsq3Lmkb1imV8pzi21HNMGiJqoxYZvv/BmzpT0hKvqs6BqIf AiVBkygf1g0ZJpPVs81hueza4Ro8s6UA/siOh174fg2JTTkEqOcJzxMUR+/3F25xDruv T7E8bnRLN3HS+bnbGz+PITBjW4o03qmwBKHGGHNZgJzSb9Br+81Gb6fFF7d0zju0oBPK IR0vvzdKZrBQnXjmQCUO5LY/6XZ/ECjAlGg6qamj151aykty4TUJeFyex/h938/bTjo3 vCW8cz8S/3yj4cwaiN3YvvgOT0bxP+sTGwSV49EwW5qdAWgNHhrStBfx/8YqXvoI9Bnn KIiA==
In-reply-to: <5175DB63.6030501@xxxxxxxxxxx>
References: <516C89DF.4070904@xxxxxxxxxx> <517596BA.3060408@xxxxxxxxxxx> <20130423000835.GL30622@dastard> <5175DB63.6030501@xxxxxxxxxxx>
Terrific. Thank you Eric, Brian, and xfs experts. You have helped us a lot.
I'll test the path.


2013/4/23 Eric Sandeen <sandeen@xxxxxxxxxxx>
On 4/22/13 7:08 PM, Dave Chinner wrote:
> 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);

Yep, it does, I put a printk in there when I was testing
and it fired.

Guess we should have tested a debug xfs right off the bat ;)

>         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....

I suppose that makes sense, it'd be a much less cryptic failure for
something that will fail soon anyway.

-Eric

> Cheers,
>
> Dave.
>




--
符永涛
<Prev in Thread] Current Thread [Next in Thread>