Thread (283 messages) 283 messages, 37 authors, 2007-07-12

Re: [RFC] Heads up on sys_fallocate()

From: Ulrich Drepper <hidden>
Date: 2007-03-05 15:48:41
Also in: linux-fsdevel, lkml

Jörn Engel wrote:
quoted
Of course.  You call posix_fallocate once for the lifetime of the file
when it is created to ensure that all future uses will work.
That part is not quite clear from the manpage but I trust most people
would assume the same.
Not only that, it is what this function is for.  In the POSIX committee
we've looked at the functions in detail before adding them, even if some
information is not in the man page but instead in the Rationale.

Still, it is quite obvious that noone designing this interface has lost
much thought to compressing filesystems.
You already have problems with supporting the functionality
posix_fallocate is supporting.  You cannot reliably support MAP_SHARED
files if all of a sudden the compression causes and expansion of a block
and that causes a ENOSPC error.  So, don't expect pity.  This is a
function in support of a real and reliable implementation of memory
mapped files.  You don't use MAP_SHARED on such filesystems, it'll eat
your kittens sooner or later anyway.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help