Re: posix_fallocate

From: Ulrich Drepper (drepper@redhat.com)
Date: Mon Apr 17 2000 - 00:29:08 EST


Chuck Lever <cel@monkey.org> writes:

> you can play simple games with mmap and msync(MS_ASYNC) to make this work
> asynchronously,

This is not an option. The purpose of the fallocate call is to fail
if there is not enough space on the disk. I.e., the operation must be
finished when the function returns.

> without changing the file's current offset. but it would probably be
> more efficient (no page table manipulation, for example) to provide
> a system call that invokes some generic interface through filemap.c
> for block file systems. something like ext2_getblk generalized and
> exposed via the file operations vector?

Right. Also, you can allocate continous blocks, if possible, which
will then also speed up the writing.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

- 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 : Sun Apr 23 2000 - 21:00:10 EST