lkml.org 
[lkml]   [2003]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Bug 417] New: htree much slower than regular ext3
From
Date
>>>>> Daniel Phillips (DP) writes:

DP> On Fri 07 Mar 03 16:46, Alex Tomas wrote:
DP> The problem I see with your approach is that the traversal is no
DP> longer in hash order, so a leaf split in the middle of a
DP> directory traversal could result in a lot of duplicate dirents.
DP> I'm not sure there's a way around that.

1) As far as I understand, duplicates are possible even in classic ext2
w/o sortdir/index. See the diagram:

Process 1 Process 2

getdents(2) returns
dentry1 (file1 -> Inode1)
dentry2 (file2 -> Inode2)

context switch -->
unlink(file1), empty dentry1
creat(file3), Inode3, use dentry1
creat(file1), Inode1, use dentry3

context switch -->

getdents(2) returns
dentry3(file1 -> Inode1)


Am I right?


2) Why do not use hash order for traversal like ext3_dx_readdir() does?
Upon reading several dentries within some hash set readdir() sorts them
in inode order and returns to an user.


with best regards, Alex

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.121 / U:1.312 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site