From: Nathan Scott <nscott@aconex.com>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [patch] rudimetary fallocate support for xfs_io
Date: Thu, 22 May 2008 16:39:01 +1000 [thread overview]
Message-ID: <1211438341.25294.506.camel@edge.scott.net.au> (raw)
In-Reply-To: <20080522061029.GO173056135@sgi.com>
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 parent reply other threads:[~2008-05-22 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 6:10 [patch] rudimetary fallocate support for xfs_io David Chinner
2008-05-22 6:39 ` Nathan Scott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211438341.25294.506.camel@edge.scott.net.au \
--to=nscott@aconex.com \
--cc=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.