F16 unusable while writing to pendrive

Fernando Cassia fcassia at gmail.com
Sun Dec 18 09:17:17 UTC 2011


On Sun, Dec 18, 2011 at 04:14, Joe Zeff <joe at zeff.us> wrote:
> Basically, the system tries to find a place big enough to hold the entire
> file instead of putting the first chunk into the first place it finds.

Please confirm if I understood this right, as I¨m not familiar with
the low-level APIs involved with file creation. Is there a way to tell
the file system that you´re creating a file with total size "x" before
any such data is written to it, I mean, as part of the file creation
call?.

I mean, it is one thing to create a file with size 0, then start
appending data to it in chunk, than say "hey, I´m creating a
8-gigabytes long file, with name xyz". If the latter exists, I´m
curious if there´s logic at the filesystem level to try to find a
chunk of free space big enough to allocate it (to reduce
fragmentation).

Is that what you are saying?.

I do know that for instance some bittorrent clients (Vuze -formerly
azureus comes to mind) allocate the full size of the file being
retrieved, then starts populating (writing) segments as those are
downloaded, but I never knew if the file creation call was a single
one or it actually consisted of the file creation call first, and then
a write of the x gigabytes of zeroes...

I can´t believe that in this day and age (i briefly looked at the
win32 api and it seems there´s no api to create a fixed-size empty
file) there´s no api for this, and that one has to rely on a per-app
implementation (ie filing zeroes).

Why am I asking this? because of this lament about the lack of a
"mkfile" command in Linux as there is in Solaris

http://madbodger.livejournal.com/114433.html

Just curious... (I know, you will tell me "it isn´t the job of a
filesystem to populate the contents of an empty file!). And maybe
you´d be right. Still, I wonder if perhaps fixed-size, empty-file
creation wouldn´t be much faster if it was implemented at the
filesystem level).

FC


More information about the users mailing list