* [PATCH] fallocate: enable fallocate options on Linux
@ 2012-02-29 20:54 Dan Ehrenberg
2012-02-29 21:22 ` Daniel Ehrenberg
0 siblings, 1 reply; 5+ messages in thread
From: Dan Ehrenberg @ 2012-02-29 20:54 UTC (permalink / raw)
To: fio, axboe; +Cc: nauman, egouriou, tirea, Dan Ehrenberg
Simple bug fix to ensure that fallocate-related options are
once again enabled on Linux systems with the right headers present.
A previous patch gated the FIO_HAVE_LINUX_FALLOCATE flag on
header versions but failed to enable FIO_HAVE_FALLOCATE in this
case.
---
os/os-linux.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/os/os-linux.h b/os/os-linux.h
index 3bf6bd9..b911753 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -51,6 +51,7 @@
* missing
*/
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 8
+#define FIO_HAVE_FALLOCATE
#define FIO_HAVE_LINUX_FALLOCATE
#endif
--
1.7.7.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fallocate: enable fallocate options on Linux
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
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Ehrenberg @ 2012-02-29 21:22 UTC (permalink / raw)
To: fio, axboe; +Cc: nauman, egouriou, tirea, Dan Ehrenberg
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.
Thanks,
Dan
On Wed, Feb 29, 2012 at 12:54 PM, Dan Ehrenberg <dehrenberg@google.com> wrote:
> Simple bug fix to ensure that fallocate-related options are
> once again enabled on Linux systems with the right headers present.
> A previous patch gated the FIO_HAVE_LINUX_FALLOCATE flag on
> header versions but failed to enable FIO_HAVE_FALLOCATE in this
> case.
> ---
> os/os-linux.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/os/os-linux.h b/os/os-linux.h
> index 3bf6bd9..b911753 100644
> --- a/os/os-linux.h
> +++ b/os/os-linux.h
> @@ -51,6 +51,7 @@
> * missing
> */
> #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 8
> +#define FIO_HAVE_FALLOCATE
> #define FIO_HAVE_LINUX_FALLOCATE
> #endif
>
> --
> 1.7.7.3
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fallocate: enable fallocate options on Linux
2012-02-29 21:22 ` Daniel Ehrenberg
@ 2012-03-01 14:41 ` Jens Axboe
2012-03-01 19:23 ` Daniel Ehrenberg
0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2012-03-01 14:41 UTC (permalink / raw)
To: Daniel Ehrenberg; +Cc: fio, nauman, egouriou, tirea
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fallocate: enable fallocate options on Linux
2012-03-01 14:41 ` Jens Axboe
@ 2012-03-01 19:23 ` Daniel Ehrenberg
2012-03-01 20:16 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Ehrenberg @ 2012-03-01 19:23 UTC (permalink / raw)
To: Jens Axboe; +Cc: fio, nauman, egouriou, tirea
On Thu, Mar 1, 2012 at 6:41 AM, Jens Axboe <axboe@kernel.dk> wrote:
> 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
>
That looks good to me. Thanks for the revision.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fallocate: enable fallocate options on Linux
2012-03-01 19:23 ` Daniel Ehrenberg
@ 2012-03-01 20:16 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2012-03-01 20:16 UTC (permalink / raw)
To: Daniel Ehrenberg; +Cc: fio, nauman, egouriou, tirea
On 2012-03-01 20:23, Daniel Ehrenberg wrote:
> On Thu, Mar 1, 2012 at 6:41 AM, Jens Axboe <axboe@kernel.dk> wrote:
>> 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
>>
>
> That looks good to me. Thanks for the revision.
Thanks for letting me know. The change has been committed.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-01 20:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-03-01 19:23 ` Daniel Ehrenberg
2012-03-01 20:16 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox