Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 9 Mar 2003 02:05:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 9 Mar 2003 02:05:02 -0500 Received: from comtv.ru ([217.10.32.4]:4554 "EHLO comtv.ru") by vger.kernel.org with ESMTP id ; Sun, 9 Mar 2003 02:05:00 -0500 X-Comment-To: Daniel Phillips To: Daniel Phillips Cc: Alex Tomas , "Martin J. Bligh" , linux-kernel , ext2-devel@lists.sourceforge.net, "Theodore Ts'o" , Andrew Morton Subject: Re: [Bug 417] New: htree much slower than regular ext3 References: <11490000.1046367063@[10.10.2.4]> <20030307173425.5C4D3FAAAE@mx12.arcor-online.net> From: Alex Tomas Organization: HOME Date: 09 Mar 2003 10:08:34 +0300 In-Reply-To: <20030307173425.5C4D3FAAAE@mx12.arcor-online.net> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1472 Lines: 37 >>>>> 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/