Re: posix_fallocate

From: Guus Sliepen (guus@warande3094.warande.uu.nl)
Date: Fri Apr 14 2000 - 06:41:06 EST


On 14 Apr 2000, Ulrich Drepper wrote:

> int posix_fallocate (int fd, off_t offset, size_t len)

> The purpose of the function is to allocate enough storage so that
> future writes to the file in the range [offset,offset+len] cannot fail
> because the storage device has no room.

Isn't it possible to just seek to offset+len and write a null byte
there? I thought (but I really don't know for sure) that would allocate
the space needed on the filesystem, and with some "sparse" file
optimalisation, this would be real quick on ext2.

Am I right/wrong?

Met vriendelijke groet,
Guus Sliepen.

-
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.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:24 EST