xfs
[Top] [All Lists]

Re: [RFC][PATCH] sys_fallocate() system call

To: "Amit K. Arora" <aarora@xxxxxxxxxxxxxxxxxx>
Subject: Re: [RFC][PATCH] sys_fallocate() system call
From: Chris Wedgwood <cw@xxxxxxxx>
Date: Wed, 21 Mar 2007 14:35:02 -0700
Cc: Matthew Wilcox <matthew@xxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, suparna@xxxxxxxxxx, cmm@xxxxxxxxxx, alex@xxxxxxxxxxxxx, suzuki@xxxxxxxxxx
In-reply-to: <20070321120425.GA27273@amitarora.in.ibm.com>
References: <20070117094658.GA17390@amitarora.in.ibm.com> <20070225022326.137b4875.akpm@linux-foundation.org> <20070301183445.GA7911@amitarora.in.ibm.com> <20070316143101.GA10152@amitarora.in.ibm.com> <20070316161704.GE8525@osiris.boeblingen.de.ibm.com> <20070317111036.GC29931@parisc-linux.org> <20070321120425.GA27273@amitarora.in.ibm.com>
Sender: xfs-bounce@xxxxxxxxxxx
I hate to comment at this late stage, especially on something that I
think is really a great idea (I did similar more complex, sys_blkalloc
with even more arguments time ago --- I'm glad given how complex this
thread has become I didn't post them now).

In the past there wasn't that much incentive to get this functionality
exposed because of various other issues (mmap + page dirty didn't
flush reliably) which are close to being resolve, so I think the
timing of this is really great....


On Wed, Mar 21, 2007 at 05:34:25PM +0530, Amit K. Arora wrote:

> As suggested by you and Russel, I have made this change to the
> patch.  Here is how it looks like now. Please let me know if anyone
> has concerns about passing arguments this way (breaking each
> "loff_t" into two "u32"s).

I really dislike breaking 64-bit args up unless it's necessary.  I
guess it doesn't really hurt, but it feels needlessly ugly.

> +     .long sys_fallocate             /* 320 */

> +/*
> + * fallocate() modes
> + */
> +#define FA_ALLOCATE  0x1
> +#define FA_DEALLOCATE        0x2
> +

given there are the only TWO modes right now, why not leave the
arguments as 64-bit sane and simply have two syscalls, one for each?


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