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() syscall with > > different

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() syscall with different arguments on s390,

Re: Interface for the new fallocate() system call

2007-04-20 Thread Jakub Jelinek
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() syscall with > different arguments on s390, than other archs. I think this should be > doable and should not

Re: Interface for the new fallocate() system call

2007-04-20 Thread Amit K. Arora
On Wed, Apr 18, 2007 at 07:06:00AM -0600, Andreas Dilger wrote: > On Apr 17, 2007 18:25 +0530, Amit K. Arora wrote: > > 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

Re: Interface for the new fallocate() system call

2007-04-20 Thread Jakub Jelinek
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() syscall with different arguments on s390, than other archs. I think this should be doable and should not be an

Re: Interface for the new fallocate() system call

2007-04-20 Thread Amit K. Arora
On Wed, Apr 18, 2007 at 07:06:00AM -0600, Andreas Dilger wrote: On Apr 17, 2007 18:25 +0530, Amit K. Arora wrote: 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

Re: Interface for the new fallocate() system call

2007-04-18 Thread Andreas Dilger
On Apr 17, 2007 18:25 +0530, Amit K. Arora wrote: > 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,

Re: Interface for the new fallocate() system call

2007-04-18 Thread Andreas Dilger
On Apr 17, 2007 18:25 +0530, Amit K. Arora wrote: 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

Re: Interface for the new fallocate() system call

2007-04-17 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. > I think more people

Re: Interface for the new fallocate() system call

2007-04-17 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. I think more people are

Re: Interface for the new fallocate() system call

2007-04-09 Thread Jörn Engel
On Mon, 9 April 2007 23:01:42 +1000, Paul Mackerras wrote: > Jörn Engel writes: > > > Wouldn't that work be confined to fallocate()? If I understand Heiko > > correctly, the alternative would slow s390 down for every syscall, > > including more performance-critical ones. > > The alternative

Re: Interface for the new fallocate() system call

2007-04-09 Thread Paul Mackerras
Jörn Engel writes: > Wouldn't that work be confined to fallocate()? If I understand Heiko > correctly, the alternative would slow s390 down for every syscall, > including more performance-critical ones. The alternative that Jakub suggested wouldn't slow s390 down. Paul. - To unsubscribe from

Re: Interface for the new fallocate() system call

2007-04-09 Thread Paul Mackerras
Jörn Engel writes: Wouldn't that work be confined to fallocate()? If I understand Heiko correctly, the alternative would slow s390 down for every syscall, including more performance-critical ones. The alternative that Jakub suggested wouldn't slow s390 down. Paul. - To unsubscribe from this

Re: Interface for the new fallocate() system call

2007-04-09 Thread Jörn Engel
On Mon, 9 April 2007 23:01:42 +1000, Paul Mackerras wrote: Jörn Engel writes: Wouldn't that work be confined to fallocate()? If I understand Heiko correctly, the alternative would slow s390 down for every syscall, including more performance-critical ones. The alternative that Jakub

Re: Interface for the new fallocate() system call

2007-04-06 Thread Andreas Dilger
On Apr 05, 2007 16:56 +0530, Amit K. Arora wrote: > This should work on all the platforms. The only concern I can think of > here is the convention being followed till now, where all the entities on > which the action has to be performed by the kernel (say fd, file/device > name, pid etc.) is the

Re: Interface for the new fallocate() system call

2007-04-06 Thread Andreas Dilger
On Apr 05, 2007 16:56 +0530, Amit K. Arora wrote: This should work on all the platforms. The only concern I can think of here is the convention being followed till now, where all the entities on which the action has to be performed by the kernel (say fd, file/device name, pid etc.) is the

Re: Interface for the new fallocate() system call

2007-04-05 Thread Randy Dunlap
On Thu, 5 Apr 2007 16:56:19 +0530 Amit K. Arora wrote: > 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

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

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); > } -- Regards,

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); } -- Regards, Amit

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 all

Re: Interface for the new fallocate() system call

2007-04-05 Thread Randy Dunlap
On Thu, 5 Apr 2007 16:56:19 +0530 Amit K. Arora wrote: 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

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
On Fri, Mar 30, 2007 at 12:44:49PM +0200, Jörn Engel wrote: > On Fri, 30 March 2007 19:15:58 +1000, Paul Mackerras wrote: > > It does mean extra unnecessary work for 64-bit platforms, though... > > Wouldn't that work be confined to fallocate()? If I understand Heiko > correctly, the alternative

Re: Interface for the new fallocate() system call

2007-03-30 Thread Jörn Engel
On Fri, 30 March 2007 19:15:58 +1000, Paul Mackerras wrote: > Heiko Carstens writes: > > > If possible I'd prefer the six-32-bit-args approach. > > It does mean extra unnecessary work for 64-bit platforms, though... Wouldn't that work be confined to fallocate()? If I understand Heiko

Re: Interface for the new fallocate() system call

2007-03-30 Thread Paul Mackerras
Heiko Carstens writes: > If possible I'd prefer the six-32-bit-args approach. It does mean extra unnecessary work for 64-bit platforms, though... Paul. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: Interface for the new fallocate() system call

2007-03-30 Thread Paul Mackerras
Jakub Jelinek writes: > 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. That looks fine to me. Paul. - To unsubscribe from this list:

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
On Fri, Mar 30, 2007 at 02:14:17AM -0500, Jakub Jelinek wrote: > On Thu, Mar 29, 2007 at 10:10:10AM -0700, Andrew Morton wrote: > > > Platform: s390 > > > -- > > > s390 prefers following layout: > > > > > >int fallocate(int fd, loff_t offset, loff_t len, int mode) > > > > > > For

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
> > Even ARM prefers above kind of layout. For details please see the > > definition of sys_arm_sync_file_range(). > > This is a clean-looking option. Can s390 be changed to support seven-arg > syscalls? > > > Option of loff_t => high u32 + low u32 > > -- > >

Re: Interface for the new fallocate() system call

2007-03-30 Thread Jakub Jelinek
On Thu, Mar 29, 2007 at 10:10:10AM -0700, Andrew Morton wrote: > > Platform: s390 > > -- > > s390 prefers following layout: > > > >int fallocate(int fd, loff_t offset, loff_t len, int mode) > > > > For details on why and how "int, int, loff_t, loff_t" is a problem on > > s390,

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
On Thu, Mar 29, 2007 at 07:01:54PM +0200, Jan Engelhardt wrote: > Hi, > > On Mar 29 2007 17:21, Amit K. Arora wrote: > > > >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

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
On Thu, Mar 29, 2007 at 07:01:54PM +0200, Jan Engelhardt wrote: Hi, On Mar 29 2007 17:21, Amit K. Arora wrote: 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

Re: Interface for the new fallocate() system call

2007-03-30 Thread Jakub Jelinek
On Thu, Mar 29, 2007 at 10:10:10AM -0700, Andrew Morton wrote: Platform: s390 -- s390 prefers following layout: int fallocate(int fd, loff_t offset, loff_t len, int mode) For details on why and how int, int, loff_t, loff_t is a problem on s390, please see Heiko's

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
Even ARM prefers above kind of layout. For details please see the definition of sys_arm_sync_file_range(). This is a clean-looking option. Can s390 be changed to support seven-arg syscalls? Option of loff_t = high u32 + low u32 -- Matthew and

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
On Fri, Mar 30, 2007 at 02:14:17AM -0500, Jakub Jelinek wrote: On Thu, Mar 29, 2007 at 10:10:10AM -0700, Andrew Morton wrote: Platform: s390 -- s390 prefers following layout: int fallocate(int fd, loff_t offset, loff_t len, int mode) For details on why and

Re: Interface for the new fallocate() system call

2007-03-30 Thread Paul Mackerras
Heiko Carstens writes: If possible I'd prefer the six-32-bit-args approach. It does mean extra unnecessary work for 64-bit platforms, though... Paul. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: Interface for the new fallocate() system call

2007-03-30 Thread Paul Mackerras
Jakub Jelinek writes: 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. That looks fine to me. Paul. - To unsubscribe from this list:

Re: Interface for the new fallocate() system call

2007-03-30 Thread Jörn Engel
On Fri, 30 March 2007 19:15:58 +1000, Paul Mackerras wrote: Heiko Carstens writes: If possible I'd prefer the six-32-bit-args approach. It does mean extra unnecessary work for 64-bit platforms, though... Wouldn't that work be confined to fallocate()? If I understand Heiko correctly, the

Re: Interface for the new fallocate() system call

2007-03-30 Thread Heiko Carstens
On Fri, Mar 30, 2007 at 12:44:49PM +0200, Jörn Engel wrote: On Fri, 30 March 2007 19:15:58 +1000, Paul Mackerras wrote: It does mean extra unnecessary work for 64-bit platforms, though... Wouldn't that work be confined to fallocate()? If I understand Heiko correctly, the alternative would

Re: Interface for the new fallocate() system call

2007-03-29 Thread Linus Torvalds
On Thu, 29 Mar 2007, Jan Engelhardt wrote: > > I have to disagree, since wrapping it into a struct and copying the struct > in kernelspace from userspace requires more code. Not just more code, but more security issues too. Passing system call arguments by value means that there are no subtle

Re: Interface for the new fallocate() system call

2007-03-29 Thread Jan Engelhardt
On Mar 29 2007 13:18, linux-os (Dick Johnson) wrote: > >I think it's always better to put only a pointer on the stack as >above. I have to disagree, since wrapping it into a struct and copying the struct in kernelspace from userspace requires more code. Pointers only become useful at 3 (rarely)

Re: Interface for the new fallocate() system call

2007-03-29 Thread linux-os \(Dick Johnson\)
On Thu, 29 Mar 2007, Jan Engelhardt wrote: > Hi, > > On Mar 29 2007 17:21, Amit K. Arora wrote: >> >> 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.

Re: Interface for the new fallocate() system call

2007-03-29 Thread Andrew Morton
On Thu, 29 Mar 2007 17:21:26 +0530 "Amit K. Arora" <[EMAIL PROTECTED]> wrote: > 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 >

Re: Interface for the new fallocate() system call

2007-03-29 Thread Jan Engelhardt
Hi, On Mar 29 2007 17:21, Amit K. Arora wrote: > >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

Re: Interface for the new fallocate() system call

2007-03-29 Thread Chris Wedgwood
On Thu, Mar 29, 2007 at 05:21:26PM +0530, Amit K. Arora wrote: >int fallocate(int fd, loff_t offset, loff_t len, int mode) Right now there are only two possible values for mode --- it's not clear what additional values there will be in the future. How about two syscalls? If we decide later

Re: Interface for the new fallocate() system call

2007-03-29 Thread Chris Wedgwood
On Thu, Mar 29, 2007 at 05:21:26PM +0530, Amit K. Arora wrote: int fallocate(int fd, loff_t offset, loff_t len, int mode) Right now there are only two possible values for mode --- it's not clear what additional values there will be in the future. How about two syscalls? If we decide later

Re: Interface for the new fallocate() system call

2007-03-29 Thread Jan Engelhardt
Hi, On Mar 29 2007 17:21, Amit K. Arora wrote: 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

Re: Interface for the new fallocate() system call

2007-03-29 Thread Andrew Morton
On Thu, 29 Mar 2007 17:21:26 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: 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

Re: Interface for the new fallocate() system call

2007-03-29 Thread linux-os \(Dick Johnson\)
On Thu, 29 Mar 2007, Jan Engelhardt wrote: Hi, On Mar 29 2007 17:21, Amit K. Arora wrote: 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

Re: Interface for the new fallocate() system call

2007-03-29 Thread Jan Engelhardt
On Mar 29 2007 13:18, linux-os (Dick Johnson) wrote: I think it's always better to put only a pointer on the stack as above. I have to disagree, since wrapping it into a struct and copying the struct in kernelspace from userspace requires more code. Pointers only become useful at 3 (rarely) or

Re: Interface for the new fallocate() system call

2007-03-29 Thread Linus Torvalds
On Thu, 29 Mar 2007, Jan Engelhardt wrote: I have to disagree, since wrapping it into a struct and copying the struct in kernelspace from userspace requires more code. Not just more code, but more security issues too. Passing system call arguments by value means that there are no subtle