* [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int
@ 2008-03-23 1:03 Kevin Xu
2008-03-23 1:45 ` Eric Sandeen
2008-03-24 22:47 ` David Chinner
0 siblings, 2 replies; 4+ messages in thread
From: Kevin Xu @ 2008-03-23 1:03 UTC (permalink / raw)
To: xfscn; +Cc: xfs
[-- Attachment #1: Type: text/plain, Size: 57 bytes --]
fix the algorithm for addname in xfs_da_node_lookup_int
[-- Attachment #2: usig-xfs-fix-080323.patch --]
[-- Type: text/x-patch, Size: 535 bytes --]
--- linux-2.6-xfs/fs/xfs/xfs_da_btree.c 2007-09-21 14:14:35.000000000 +0800
+++ linux-xfs-usig/fs/xfs/xfs_da_btree.c 2008-03-23 08:19:13.583751436 +0800
@@ -1161,7 +1161,7 @@ xfs_da_node_lookup_int(xfs_da_state_t *s
ASSERT(0);
return XFS_ERROR(EFSCORRUPTED);
}
- if (((retval == ENOENT) || (retval == ENOATTR)) &&
+ if ((((retval == ENOENT) && (state->extrablk.index == -1)) || (retval == ENOATTR)) &&
(blk->hashval == args->hashval)) {
error = xfs_da_path_shift(state, &state->path, 1, 1,
&retval);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int
2008-03-23 1:03 [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int Kevin Xu
@ 2008-03-23 1:45 ` Eric Sandeen
2008-03-23 3:05 ` Kevin Xu
2008-03-24 22:47 ` David Chinner
1 sibling, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2008-03-23 1:45 UTC (permalink / raw)
To: Kevin Xu; +Cc: xfscn, xfs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int
2008-03-23 1:45 ` Eric Sandeen
@ 2008-03-23 3:05 ` Kevin Xu
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Xu @ 2008-03-23 3:05 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfscn, xfs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int
2008-03-23 1:03 [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int Kevin Xu
2008-03-23 1:45 ` Eric Sandeen
@ 2008-03-24 22:47 ` David Chinner
1 sibling, 0 replies; 4+ messages in thread
From: David Chinner @ 2008-03-24 22:47 UTC (permalink / raw)
To: Kevin Xu; +Cc: xfscn, xfs
On Sun, Mar 23, 2008 at 09:03:57AM +0800, Kevin Xu wrote:
> fix the algorithm for addname in xfs_da_node_lookup_int
As Eric already asked, please include a complete description of the
problem you are fixing, as well as including a "Signed-off-by"
line as per Documentation/SubmittingPatches.
What you've indicated may indeed be a bug, but I'd like to see a
test case that demonstrates the problem first and that your patch
fixes the test case.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-24 22:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-23 1:03 [PATCH]fix the algorithm for addname in xfs_da_node_lookup_int Kevin Xu
2008-03-23 1:45 ` Eric Sandeen
2008-03-23 3:05 ` Kevin Xu
2008-03-24 22:47 ` David Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox