From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?SsO2cm4=?= Engel Subject: Re: Good place to drop preallocation on directories Date: Thu, 20 Nov 2008 12:05:55 +0100 Message-ID: <20081120110555.GA30887@logfs.org> References: <20081119203242.GE29820@duck.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from lazybastard.de ([212.112.238.170]:34347 "EHLO longford.logfs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754028AbYKTLGG (ORCPT ); Thu, 20 Nov 2008 06:06:06 -0500 Content-Disposition: inline In-Reply-To: <20081119203242.GE29820@duck.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 19 November 2008 21:32:42 +0100, Jan Kara wrote: >=20 > I have a problem in UDF so I thought I'll post it here if someone h= as a > good idea how to solve it. > UDF does preallocation on directories (on files a well, but that is= not a > problem). Now this helps against directory fragmentation but there is= an > issue with it: When to drop this preallocation? Currently it is done = in > udf_clear_inode() which has two problems: > 1) udf_clear_inode() is really called to late to do anything like f= reeing > space from inode and UDF has to play some nasty tricks (like > explicitely syncing inode, calling invalidate_inode_buffers() on= ce > more) to make everything work. Using udf_drop_inode() would be m= uch > better but that is called under i_lock so it's not really usable > (unless I'd drop i_lock in it but then it would even nastier). > 2) When you create lots of directories, they use quite some additio= nal > space for preallocation and there's not really a got way how to = get rid > of preallocated blocks than dropping dcache or umount + mount th= e > filesystem. >=20 > So after all I'm thinking whether directory preallocation is really= worth > the trouble. But before I go and rip it I'd like to check whether som= eone > does not have some clever idea :). Problem 2 has lru written all over, don't you think? Problem 1 is similar to something I'm debugging this very moment. With some luck my solution might work for you as well. However, I don't see a big difference between files and directories yet= =2E Maybe because there shouldn't be, or maybe because I've been missing something critical. Could you elaborate on that? J=C3=B6rn --=20 It's just what we asked for, but not what we want! -- anonymous -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html