From: Jens Axboe <axboe@kernel.dk>
To: Daniel Ehrenberg <dehrenberg@google.com>
Cc: fio@vger.kernel.org, nauman@google.com, egouriou@google.com,
tirea@google.com
Subject: Re: [PATCH] fallocate: enable fallocate options on Linux
Date: Thu, 01 Mar 2012 15:41:02 +0100 [thread overview]
Message-ID: <4F4F8A7E.1010206@kernel.dk> (raw)
In-Reply-To: <CAAK6Zt3fiTZpmkK6tyMVOAWAdL4FZgOTAa7SE2U6d80-tRanxg@mail.gmail.com>
On 02/29/2012 10:22 PM, Daniel Ehrenberg wrote:
> Hi,
>
> I'd just like to clarify: I'm not sure if the patch I just sent is
> exactly what we'd want. Maybe it is correct to set FIO_HAVE_FALLOCATE
> on some Linux systems which aren't at least glibc version 2.8. I don't
> know much about the history of these features, and if any fio users
> are using an older system where they do still want fallocate
> capabilities, I'd appreciate input here.
There is something a bit wonky there. We should be able to use
posix_fallocate() from 2.6 and on, but only the linux fallocate from 2.8
and up.
Something like the below.
diff --git a/os/os-linux.h b/os/os-linux.h
index 3bf6bd9..d5c3f76 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -50,6 +50,9 @@
* Can only enable this for newer glibcs, or the header and defines are
* missing
*/
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 6
+#define FIO_HAVE_FALLOCATE
+#endif
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 8
#define FIO_HAVE_LINUX_FALLOCATE
#endif
--
Jens Axboe
next prev parent reply other threads:[~2012-03-01 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 20:54 [PATCH] fallocate: enable fallocate options on Linux Dan Ehrenberg
2012-02-29 21:22 ` Daniel Ehrenberg
2012-03-01 14:41 ` Jens Axboe [this message]
2012-03-01 19:23 ` Daniel Ehrenberg
2012-03-01 20:16 ` Jens Axboe
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=4F4F8A7E.1010206@kernel.dk \
--to=axboe@kernel.dk \
--cc=dehrenberg@google.com \
--cc=egouriou@google.com \
--cc=fio@vger.kernel.org \
--cc=nauman@google.com \
--cc=tirea@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox