login
Header Space

 
 

Re: Deleting large files

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Morten Welinder <mwelinder@...>
Cc: linux-kernel <linux-kernel@...>
Date: Wednesday, May 7, 2008 - 6:34 pm

On Wed, 7 May 2008, Morten Welinder wrote:


Suppose you had an N GB file that just filled up the disk. You now
delete it, but get control back before it is really deleted. You
now start to write a new file that will eventually just fill up
the disk. Your task will get a media full error long before
the media is really full because the old file's data space
hasn't been freed yet. So, to "fix" this, you modify the file-
system to defer your logical writes until all the previous
spaces has been freed (writes to the physical media are deferred
anyway as long as there is RAM available). The result is that
your new data, that may be precious from a quasi-real-time source,
will fail to be written. To "fix" this, you queue everything.
This will eventually fail because the disk and RAM are of
a finite size. The size of the disk is known, but you don't
know what will be deleted before the queued writes have
completed, so you really don't know when to tell the writer
that there is no more space available.

That's why the task that deletes data can't get control back
until is has been deleted. However, for user applications, at
the user's risk, one can do `rm filename &` and let the shell
do the waiting.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.22.1 on an i686 machine (5588.29 BogoMips).
My book : http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Deleting large files, Morten Welinder, (Wed May 7, 3:49 pm)
Re: Deleting large files, Pavel Machek, (Sat May 17, 8:15 am)
Re: Deleting large files, Christian Kujau, (Thu May 8, 1:29 pm)
Re: Deleting large files, Matti Aarnio, (Thu May 8, 4:19 am)
Re: Deleting large files, Christoph Hellwig, (Sun May 11, 7:16 am)
Re: Deleting large files, Aneesh Kumar K.V, (Sun May 11, 12:42 pm)
Re: Deleting large files, linux-os (Dick Johnson), (Wed May 7, 6:34 pm)
Re: Deleting large files, Morten Welinder, (Wed May 7, 7:14 pm)
Re: Deleting large files, Pavel Machek, (Tue May 20, 10:33 am)
Re: Deleting large files, Jan Engelhardt, (Sun May 11, 6:30 am)
Re: Deleting large files, Enrico Weigelt, (Sun May 11, 12:38 pm)
Re: Deleting large files, Alan Cox, (Thu May 8, 7:01 pm)
Re: Deleting large files, Jan Engelhardt, (Wed May 7, 4:10 pm)
Re: Deleting large files, Xavier Bestel, (Wed May 7, 4:17 pm)
Re: Deleting large files, Jan Engelhardt, (Wed May 7, 4:48 pm)
speck-geostationary