On Mon, Mar 05, 2012 at 08:50:29PM +0800, Zheng Liu wrote:
Hi list,
Block allocation is a key component of file system. Every file systems try to
improve the performance with optimizing the block allocation of a file. But no
matter what file system does, it just guesses what the user expects. Thus, it
is not very accurate. fadvise(2) provides a method to let the user to give a
hint to file system. However, until now, only few flags are provided. So we
can provide more flags to tell file system how to allocate the blocks for a
file.
For example:
we can add these flags into fadvise(2):
FADV_ALLOC_READ_SEQ
fallocate()
FADV_ALLOC_READ_RANDOM
Allocation can't be optimised as the read pattern cannot be defined.
FADV_ALLOC_WRITE_ONCE
fallocate()
FADV_ALLOC_WRITE_APPEND
chattr +a
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com