| To: | David Chinner <dgc@xxxxxxx> |
|---|---|
| Subject: | Re: [patch] rudimetary fallocate support for xfs_io |
| From: | Nathan Scott <nscott@xxxxxxxxxx> |
| Date: | Thu, 22 May 2008 16:39:01 +1000 |
| Cc: | xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx> |
| In-reply-to: | <20080522061029.GO173056135@xxxxxxx> |
| Organization: | Aconex |
| References: | <20080522061029.GO173056135@xxxxxxx> |
| Reply-to: | nscott@xxxxxxxxxx |
| Sender: | xfs-bounce@xxxxxxxxxxx |
On Thu, 2008-05-22 at 16:10 +1000, David Chinner wrote:
>
> +#if defined(__i386__)
> +#define __NR_fallocate 324
> +#elif defined(__x86_64__)
> +#define __NR_fallocate 285
> +#elif defined(__ia64__)
> +#define __NR_fallocate 1303
> +#endif
> +
> +static int
> +fallocate(int fd, int cmd, off64_t start, off64_t len)
> +{
> + return syscall(__NR_fallocate, fd, cmd, start, len);
> +}
This will cause xfsprogs build breakage on any architecture
other than the above three; check out the approach taken in
xfs-cmds/attr/libattr/syscalls.c to avoid this (give ENOSYS
for the unknown archs).
cheers.
--
Nathan
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [hack] allow xfsrestore to run on 64k page size machines, David Chinner |
|---|---|
| Next by Date: | Re: [PATCH] use generic_*xattr routines, Timothy Shimmin |
| Previous by Thread: | [patch] rudimetary fallocate support for xfs_io, David Chinner |
| Next by Thread: | [patch] xfsqa 078 - use rmdir to remove directories, David Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |