[Top] [All Lists]

Re: Review: xfs_repair fixes for dir2 corruption

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: Review: xfs_repair fixes for dir2 corruption
From: Madan Valluri <mvalluri@xxxxxxx>
Date: Fri, 28 Jul 2006 07:45:12 -0700
Cc: Barry Naujok <bnaujok@xxxxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20060728181013.C2197701@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <20060728091735.B2196410@xxxxxxxxxxxxxxxxxxxxxxxx> <200607280155.LAA12814@xxxxxxxxxxxxxxxxxxxxxxx> <20060728181013.C2197701@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird (Windows/20060719)
Nathan Scott wrote:
On Fri, Jul 28, 2006 at 11:58:52AM +1000, Barry Naujok wrote:
This patch addresses the following xfs_repair issues:

The libxfs cache stuff looks good to me.  Maybe Madan can cast
an eye over the repair changes for ya?


1) Since dir_hash_add can be called for both V1 and V2 directories its second parameter type xfs_dir2_dataptr_t should be neutral. 2) In dir_hash_add when dup is set, do you still need to add to the nextbyhash by list? 3) The following statement in longform_dir2_rebuild looks odd. Besides, FWIW, you can match "/."

if (p->name[0] == '/' || (p->name[0] == '.' && (p->namelen == 1
                               || (p->namelen == 2 && p->name[1] == '.'))))


if (((p->name[0] == '/' || p->name[0] == '.') && p->namelen == 1) || (p->name[0] == '.' && p->name[1] == '.' && p->namelen == 2))

4) Related to items 2&3, shouldn't the code be skipping duplicate entries?
5) Can we do anything to minimize the do_error calls in longform_dir2_rebuild? Seems like on a full file system, while rebuilding say the root directory, matters can get wacky - The directory is being rebuilt and we have no further room. Sounds like that this how it has been....



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