xfs
[Top] [All Lists]

Re: Interface for the new fallocate() system call

To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: Interface for the new fallocate() system call
From: Jakub Jelinek <jakub@xxxxxxxxxx>
Date: Fri, 30 Mar 2007 02:14:17 -0500
Cc: "Amit K. Arora" <aarora@xxxxxxxxxxxxxxxxxx>, torvalds@xxxxxxxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, suparna@xxxxxxxxxx, cmm@xxxxxxxxxx
In-reply-to: <20070329101010.7a2b8783.akpm@xxxxxxxxxxxxxxxxxxxx>
References: <20070117094658.GA17390@xxxxxxxxxxxxxxxxxxxx> <20070225022326.137b4875.akpm@xxxxxxxxxxxxxxxxxxxx> <20070301183445.GA7911@xxxxxxxxxxxxxxxxxxxx> <20070316143101.GA10152@xxxxxxxxxxxxxxxxxxxx> <20070316161704.GE8525@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20070317111036.GC29931@xxxxxxxxxxxxxxxx> <20070321120425.GA27273@xxxxxxxxxxxxxxxxxxxx> <20070329115126.GB7374@xxxxxxxxxxxxxxxxxxxx> <20070329101010.7a2b8783.akpm@xxxxxxxxxxxxxxxxxxxx>
Reply-to: Jakub Jelinek <jakub@xxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
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 mail on 16th March. Here is the link:
> > http://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg133595.html
> > 
> > Platform: ppc, arm
> > ------------------
> > ppc (32 bit) has a problem with "int, loff_t, loff_t, int" layout,
> > since this will result in a pad between fd and offset, making seven
> > arguments total - which is not supported by ppc32. It supports only
> > 6 arguments. Thus the desired layout by ppc32 is:
> > 
> >    int fallocate(int fd, int mode, loff_t offset, loff_t len)
> > 
> > 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?

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.

        Jakub


<Prev in Thread] Current Thread [Next in Thread>