fallocate-implementation-on-i86-x86_64-and-powerpc.patch (was: re: -mm merge plans for 2.6.23)

From: Theodore Tso
Date: Tue Jul 10 2007 - 07:53:18 EST


On Tue, Jul 10, 2007 at 01:31:52AM -0700, Andrew Morton wrote:
> Merge
>
> fallocate-implementation-on-i86-x86_64-and-powerpc.patch

Andrew,

Could you replace the comment/header section of
fallocate-implementation-on-i86-x86_64-and-powerpc.patch with the
following (attached below) ? This is from the ext4 patches, where
Amit had cleaned up description, which will make for a cleaner and
easier to understand submission into the git tree.

I've reviewed the other fallocate patches, noting the request to drop
the s390 patches since Martin has said he will wire up it up after
this hits mainline, and the only other change that I've found between
what we have in the ext4 tree and -mm is that we have

fallocate-on-ia64.patch
and
fallocate-on-ia64-fix.patch

merged into a single patch. It probably would be better to merge them
before sending it off to Linus, in the interests of cleanliness and
making the tree more git-bisect friendly.

Regards,

- Ted


From: Amit Arora <aarora@xxxxxxxxxx>

sys_fallocate() implementation on i386, x86_64 and powerpc

fallocate() is a new system call being proposed here which will allow
applications to preallocate space to any file(s) in a file system.
Each file system implementation that wants to use this feature will need
to support an inode operation called ->fallocate().
Applications can use this feature to avoid fragmentation to certain
level and thus get faster access speed. With preallocation, applications
also get a guarantee of space for particular file(s) - even if later the
the system becomes full.

Currently, glibc provides an interface called posix_fallocate() which
can be used for similar cause. Though this has the advantage of working
on all file systems, but it is quite slow (since it writes zeroes to
each block that has to be preallocated). Without a doubt, file systems
can do this more efficiently within the kernel, by implementing
the proposed fallocate() system call. It is expected that
posix_fallocate() will be modified to call this new system call first
and incase the kernel/filesystem does not implement it, it should fall
back to the current implementation of writing zeroes to the new blocks.
ToDos:
1. Implementation on other architectures (other than i386, x86_64,
ppc64 and s390(x)). David Chinner has already posted a patch for ia64.
2. A generic file system operation to handle fallocate
(generic_fallocate), for filesystems that do _not_ have the fallocate
inode operation implemented.
3. Changes to glibc,
a) to support fallocate() system call
b) to make posix_fallocate() and posix_fallocate64() call fallocate()


Signed-off-by: Amit Arora <aarora@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: "Luck, Tony" <tony.luck@xxxxxxxxx>
Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Theodore Ts'o <tytso@xxxxxxx>
Cc: Mark Fasheh <mark.fasheh@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/