[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(int

Ext4 devel interlock meeting minutes (Feb. 28, 2007)

2007-03-01 Thread Avantika Mathur
Ext4 Developer Interlock Call: 01/28/2007 Meeting Minutes Attendees: Mingming Cao, Suparna Bhattacharya, Dave Kleikamp, Eric Sandeen, Takashi Sato, Avantika Mathur Minutes can be accessed at: http://ext4.wiki.kernel.org/index.php/Ext4_Developer%27s_Conference_Call Mingming sent out minutes

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Jeff Garzik
Amit K. Arora wrote: 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

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Jeremy Allison
On Thu, Mar 01, 2007 at 03:23:19PM -0500, Jeff Garzik wrote: I certainly agree that we want something like this. posix_fallocate() is the glibc interface we want to be compatible with (which your definition is, AFAICS). This would be great for Samba. Windows clients do this a lot

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Jeremy Fitzhardinge
Amit K. Arora wrote: + if (inode-i_op inode-i_op-fallocate) + ret = inode-i_op-fallocate(inode, offset, len); + else + ret = -ENOTTY; You can only allocate space on typewriters? ;) J - To unsubscribe from this list: send the line unsubscribe linux-ext4 in

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Alan
On Thu, 01 Mar 2007 13:14:32 -0800 Jeremy Fitzhardinge [EMAIL PROTECTED] wrote: Amit K. Arora wrote: + if (inode-i_op inode-i_op-fallocate) + ret = inode-i_op-fallocate(inode, offset, len); + else + ret = -ENOTTY; You can only allocate space on typewriters? ;)

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Jeremy Fitzhardinge
Alan wrote: A lot of people get confused about -ENOTTY, but it is the return for attempting to use an ioctl on the wrong type of object, so this appears to be quite correct. This is a syscall though; ENOSYS is probably a better match. J - To unsubscribe from this list: send the line

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Jeremy Fitzhardinge
Alan wrote: ENOSYS indicates quite different things and ENOTTY is also used for syscalls. I still think ENOTTY is correct. Yes, ENOSYS tends to me operation flat out not support rather than not on this object. I think we can do better than ENOTTY though - ENOTSUP for example (modulo the

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Andrew Morton
On Fri, 2 Mar 2007 00:04:45 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: 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

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Anton Blanchard
That new argument might need to come after fd - ARM has funny requirements on syscall arg padding and layout. FYI the 32bit ppc ABI does too, from arch/powerpc/kernel/sys_ppc32.c: /* * long long munging: * The 32 bit ABI passes long longs in an odd even register pair. */ and the first

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Andrew Morton
On Thu, 01 Mar 2007 22:44:16 + Dave Kleikamp [EMAIL PROTECTED] wrote: On Thu, 2007-03-01 at 14:25 -0800, Andrew Morton wrote: On Fri, 2 Mar 2007 00:04:45 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: +asmlinkage long sys_fallocate(int fd, loff_t offset, loff_t len) +{ + struct

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Christoph Hellwig
On Fri, Mar 02, 2007 at 12:04:45AM +0530, Amit K. Arora wrote: 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

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Christoph Hellwig
On Thu, Mar 01, 2007 at 10:44:16PM +, Dave Kleikamp wrote: Would EINVAL (or whatever) make it back to the caller of posix_fallocate(), or would glibc fall back to its current implementation? Forgive me if I haven't put enough thought into it, but would it be useful to create a

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Andrew Morton
On Thu, 01 Mar 2007 22:03:55 -0800 Badari Pulavarty [EMAIL PROTECTED] wrote: Just curious .. What does posix_fallocate() return ? bookmark this: http://www.opengroup.org/onlinepubs/009695399/nfindex.html Upon successful completion, posix_fallocate() shall return zero; otherwise, an

Re: [RFC] Heads up on sys_fallocate()

2007-03-01 Thread Ulrich Drepper
Andrew Morton wrote: Perhaps Ulrich can comment. I was out of town, hence the delay. I think that if there is no support for the syscall the correct answer is to return ENOSYS. In this case the current userlevel code would be used and ENOSYS is also used to trigger the use of the compat code