lkml.org 
[lkml]   [1998]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ext2fs enhacement/fix [re: shrinking directories]
On Thu, Jul 16, 1998 at 01:20:19AM -0600, Larry McVoy wrote:

> : Have unlink check to see if the current size >= 2* required size and
> : shrink on that?
>
> I like this idea a lot.
>
> It has the nice attribute that the process causing the problem is the one
> that gets slowed down.
>
> It will slow down unlinks, but I would think that is OK for this sort of
> thing.

Only for some unlinks. Assuming 4k block and a news server where filenames
are about 5 chars long, we can get 200 or do files per block, so if we have
to remove all files from a directory that once contained 40,000 files, the
shrink operation only happens 8 times or so.

(Umm... ceiling(log_2 (40,000 / 200) ) right?)



-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

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