Re: [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int

Kevin Xu
2008-03-23T03:05:32Z

Eric Sandeen wrote:
> Kevin Xu wrote:
>
>> fix the algorithm for addname in xfs_da_node_lookup_int
>>
>
> Could you please include a bit more of a changelog, i.e. what was broken
> and how does this fix it? Perhaps a testcase, if there is one?
>
> -Eric
>
>
I think there is a problem in original processing.
When add a new entry and its hash value is already exist in current
directory, furthermore the hash value
is the last one in a leaf block, although we already found a freespace
block for adding the new entry,
but we drop this one and continue to check, until the last same hash value.
I think the reason is that xfs_da_node_lookup_int is a common function
for addname and lookup.

I added a condition before enter another leaf block, only when we didn't
find a freespace block for the new entry,
then we need to enter another leaf block.

Regards
Kevin