lkml.org 
[lkml]   [1998]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: e2fs + large disk == slug?
Date
From
Alan Cox wrote:
>
> > | Just deleted a 2 Gig file on a Solaris machine. It worked instatntly
> > | but the disk space was freed in background.
> > |
> > | Place for possible improvement.
> >
> > I would hope Linux never does this optimization. I tend to do things like:
> >
> > rm -rf <dir>; df
> >
> > expecting df to be accurate immediately after the delete.
>
> Then I suggest you implement it so that df sleeps on its file system query
> until the asynchronous rm finishes. Thats a big win on rm of big files and
> no pain

Aarghhh. I'd hate it if it worked like that. Gives me a DOS feeling.
How about adjusting the stats for the filesystem at the beginning of
the "walk the list of blocks, and free them as you go". That would
give the "df" accurate results, and allow the unlink to work in the
background.

pseudo-pseudo code:

do_unlink ...

inode->sb->free += inode->blocks
if (fork ()) return;
for (.... )
free_block (i);

Roger.

--
Actor asks a collegue: "To what do you owe your success in acting?"
Answer: "Honesty. Once you've learned how to fake that, you've got it made."
-------- Custom Linux device drivers for sale! Call for a quote. ----------
Email: R.E.Wolff@BitWizard.nl || Tel: +31-15-2137555 || FAX: +31-15-2138217
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.050 / U:1.140 seconds]
©2003-2014 Jasper Spaans. Advertise on this site