Re: Interface for the new fallocate() system call

2007-04-05 Thread Amit K. Arora
On Thu, Apr 05, 2007 at 04:56:19PM +0530, Amit K. Arora wrote: Correction below: > asmlinkage long sys_s390_fallocate(int fd, loff_t offset, loff_t len, int > mode) > { > return sys_fallocate(fd, offset, len, mode); return sys_fallocate(fd, mode, offset, len); >

Re: Interface for the new fallocate() system call

2007-04-05 Thread Amit K. Arora
On Fri, Mar 30, 2007 at 02:14:17AM -0500, Jakub Jelinek wrote: > Wouldn't > int fallocate(loff_t offset, loff_t len, int fd, int mode) > work on both s390 and ppc/arm? glibc will certainly wrap it and > reorder the arguments as needed, so there is no need to keep fd first. This should work on al

Re: Interface for the new fallocate() system call

2007-04-24 Thread Amit K. Arora
On Fri, Apr 20, 2007 at 10:59:18AM -0400, Jakub Jelinek wrote: > On Fri, Apr 20, 2007 at 07:21:46PM +0530, Amit K. Arora wrote: > > Ok. > > In this case we may have to consider following things: > > > > 1) Obviously, for this glibc will have to call fallocate()

[PATCH 0/5] fallocate system call

2007-04-26 Thread Amit K. Arora
Based on the discussion, this new patchset uses following as the interface for fallocate() system call: asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len) It seems that only s390 architecture has a problem with such a layout of arguments in fallocate(). Thus for s390, we

[PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-04-26 Thread Amit K. Arora
This patch implements the fallocate() system call and adds support for i386, x86_64 and powerpc. NOTE: It is based on 2.6.21 kernel version. Signed-off-by: Amit Arora <[EMAIL PROTECTED]> --- arch/i386/kernel/syscall_table.S |1 arch/powerpc/kernel/sys_ppc32.c |7 ++ arch/x86_64/ker

[PATCH 2/5] fallocate() on s390

2007-04-26 Thread Amit K. Arora
This patch implements support of fallocate system call on s390(x) platform. A wrapper is added to address the issue which s390 ABI has with "preferred" ordering of arguments in this system call (i.e. int, int, loff_t, loff_t). I will request s390 experts to please review this code and verify if th

[PATCH 3/5] ext4: Extent overlap bugfix

2007-04-26 Thread Amit K. Arora
This is a fix for an extent-overlap bug. The fallocate() implementation on ext4 depends on this bugfix. Though this fix had been posted earlier, but because it is still not part of mainline code, I have attached it here too. Signed-off-by: Amit Arora <[EMAIL PROTECTED]> --- fs/ext4/extents.c

[PATCH 4/5] ext4: fallocate support in ext4

2007-04-26 Thread Amit K. Arora
This patch has the ext4 implemtation of fallocate system call. Signed-off-by: Amit Arora <[EMAIL PROTECTED]> --- fs/ext4/extents.c | 201 +++- fs/ext4/file.c |1 include/linux/ext4_fs.h |7 + include/linux/ext4_f

[PATCH 5/5] ext4: write support for preallocated blocks/extents

2007-04-26 Thread Amit K. Arora
This patch adds write support for preallocated (using fallocate system call) blocks/extents. The preallocated extents in ext4 are marked "uninitialized", hence they need special handling especially while writing to them. This patch takes care of that. Signed-off-by: Amit Arora <[EMAIL PROTECTED]>

[RFC] Heads up on sys_fallocate()

2007-03-01 Thread Amit K. Arora
This is to give a heads up on few patches that we will be soon coming up with. These patches implement a new system call sys_fallocate() and a new inode operation "fallocate", for persistent preallocation. The new system call, as Andrew suggested, will look like: asmlinkage long sys_fallocate(in

Interface for the new fallocate() system call

2007-03-29 Thread Amit K. Arora
Hello, We need to come up with the best possible layout of arguments for the fallocate() system call. Various architectures have different requirements for how the arguments should look like. Since the mail chain has become huge, here is the summary of various inputs received so far. Platform: s3

Re: [PATCH 0/5] fallocate system call

2007-05-02 Thread Amit K. Arora
On Sun, Apr 29, 2007 at 10:25:59PM -0700, Chris Wedgwood wrote: > On Mon, Apr 30, 2007 at 10:47:02AM +1000, David Chinner wrote: > > > For FA_ALLOCATE, it's supposed to change the file size if we > > allocate past EOF, right? > > I would argue no. Use truncate for that. The patch I posted for e

<    1   2