* [PATCH] check stx_dio_offset_align to determine if DIO is supported
@ 2024-09-23 9:06 Wu Bo
2024-09-23 11:01 ` Filipe Manana
0 siblings, 1 reply; 5+ messages in thread
From: Wu Bo @ 2024-09-23 9:06 UTC (permalink / raw)
To: fstests; +Cc: Zorro Lang, Christoph Hellwig, Wu Bo, Wu Bo
According to the statx manual, if stx_dio_offset_align is 0, it
indicates that Direct I/O (DIO) is not supported on this file.
Signed-off-by: Wu Bo <wubo.oduw@gmail.com>
---
src/min_dio_alignment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/min_dio_alignment.c b/src/min_dio_alignment.c
index 131f6023..c50ae8c3 100644
--- a/src/min_dio_alignment.c
+++ b/src/min_dio_alignment.c
@@ -28,7 +28,7 @@ static int min_dio_alignment(const char *mntpnt, const char *devname)
fd = open(mntpnt, O_TMPFILE | O_RDWR | O_EXCL, 0600);
if (fd >= 0 &&
xfstests_statx(fd, "", AT_EMPTY_PATH, STATX_DIOALIGN, &stx) == 0 &&
- (stx.stx_mask & STATX_DIOALIGN))
+ (stx.stx_mask & STATX_DIOALIGN) && stx.stx_dio_offset_align)
return stx.stx_dio_offset_align;
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] check stx_dio_offset_align to determine if DIO is supported
2024-09-23 9:06 [PATCH] check stx_dio_offset_align to determine if DIO is supported Wu Bo
@ 2024-09-23 11:01 ` Filipe Manana
2024-09-23 13:46 ` Zorro Lang
0 siblings, 1 reply; 5+ messages in thread
From: Filipe Manana @ 2024-09-23 11:01 UTC (permalink / raw)
To: Wu Bo; +Cc: fstests, Zorro Lang, Christoph Hellwig, Wu Bo
On Mon, Sep 23, 2024 at 10:06 AM Wu Bo <wubo.oduw@gmail.com> wrote:
>
> According to the statx manual, if stx_dio_offset_align is 0, it
> indicates that Direct I/O (DIO) is not supported on this file.
There's already a patch for this:
https://lore.kernel.org/fstests/20240911035333.364961-1-chao@kernel.org/
(but not merged yet)
Thanks.
>
> Signed-off-by: Wu Bo <wubo.oduw@gmail.com>
> ---
> src/min_dio_alignment.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/min_dio_alignment.c b/src/min_dio_alignment.c
> index 131f6023..c50ae8c3 100644
> --- a/src/min_dio_alignment.c
> +++ b/src/min_dio_alignment.c
> @@ -28,7 +28,7 @@ static int min_dio_alignment(const char *mntpnt, const char *devname)
> fd = open(mntpnt, O_TMPFILE | O_RDWR | O_EXCL, 0600);
> if (fd >= 0 &&
> xfstests_statx(fd, "", AT_EMPTY_PATH, STATX_DIOALIGN, &stx) == 0 &&
> - (stx.stx_mask & STATX_DIOALIGN))
> + (stx.stx_mask & STATX_DIOALIGN) && stx.stx_dio_offset_align)
> return stx.stx_dio_offset_align;
>
> /*
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] check stx_dio_offset_align to determine if DIO is supported
2024-09-23 11:01 ` Filipe Manana
@ 2024-09-23 13:46 ` Zorro Lang
2024-10-07 12:14 ` Filipe Manana
0 siblings, 1 reply; 5+ messages in thread
From: Zorro Lang @ 2024-09-23 13:46 UTC (permalink / raw)
To: Filipe Manana; +Cc: Wu Bo, fstests, Zorro Lang, Christoph Hellwig, Wu Bo
On Mon, Sep 23, 2024 at 12:01:22PM +0100, Filipe Manana wrote:
> On Mon, Sep 23, 2024 at 10:06 AM Wu Bo <wubo.oduw@gmail.com> wrote:
> >
> > According to the statx manual, if stx_dio_offset_align is 0, it
> > indicates that Direct I/O (DIO) is not supported on this file.
>
> There's already a patch for this:
>
> https://lore.kernel.org/fstests/20240911035333.364961-1-chao@kernel.org/
>
> (but not merged yet)
Thanks Filipe. Yes, this's fixed by Chao Yu. You can check it in
"patches-in-queue" branch, it'll be merged to for-next soon (this
week I hope).
Thanks,
Zorro
>
> Thanks.
>
> >
> > Signed-off-by: Wu Bo <wubo.oduw@gmail.com>
> > ---
> > src/min_dio_alignment.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/min_dio_alignment.c b/src/min_dio_alignment.c
> > index 131f6023..c50ae8c3 100644
> > --- a/src/min_dio_alignment.c
> > +++ b/src/min_dio_alignment.c
> > @@ -28,7 +28,7 @@ static int min_dio_alignment(const char *mntpnt, const char *devname)
> > fd = open(mntpnt, O_TMPFILE | O_RDWR | O_EXCL, 0600);
> > if (fd >= 0 &&
> > xfstests_statx(fd, "", AT_EMPTY_PATH, STATX_DIOALIGN, &stx) == 0 &&
> > - (stx.stx_mask & STATX_DIOALIGN))
> > + (stx.stx_mask & STATX_DIOALIGN) && stx.stx_dio_offset_align)
> > return stx.stx_dio_offset_align;
> >
> > /*
> > --
> > 2.34.1
> >
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] check stx_dio_offset_align to determine if DIO is supported
2024-09-23 13:46 ` Zorro Lang
@ 2024-10-07 12:14 ` Filipe Manana
2024-10-11 5:50 ` Zorro Lang
0 siblings, 1 reply; 5+ messages in thread
From: Filipe Manana @ 2024-10-07 12:14 UTC (permalink / raw)
To: Zorro Lang; +Cc: Wu Bo, fstests, Zorro Lang, Christoph Hellwig, Wu Bo
On Mon, Sep 23, 2024 at 2:46 PM Zorro Lang <zlang@redhat.com> wrote:
>
> On Mon, Sep 23, 2024 at 12:01:22PM +0100, Filipe Manana wrote:
> > On Mon, Sep 23, 2024 at 10:06 AM Wu Bo <wubo.oduw@gmail.com> wrote:
> > >
> > > According to the statx manual, if stx_dio_offset_align is 0, it
> > > indicates that Direct I/O (DIO) is not supported on this file.
> >
> > There's already a patch for this:
> >
> > https://lore.kernel.org/fstests/20240911035333.364961-1-chao@kernel.org/
> >
> > (but not merged yet)
>
> Thanks Filipe. Yes, this's fixed by Chao Yu. You can check it in
> "patches-in-queue" branch, it'll be merged to for-next soon (this
> week I hope).
It missed the last update and it's still not in the "patches-in-queue" branch.
Thanks.
>
> Thanks,
> Zorro
>
> >
> > Thanks.
> >
> > >
> > > Signed-off-by: Wu Bo <wubo.oduw@gmail.com>
> > > ---
> > > src/min_dio_alignment.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/src/min_dio_alignment.c b/src/min_dio_alignment.c
> > > index 131f6023..c50ae8c3 100644
> > > --- a/src/min_dio_alignment.c
> > > +++ b/src/min_dio_alignment.c
> > > @@ -28,7 +28,7 @@ static int min_dio_alignment(const char *mntpnt, const char *devname)
> > > fd = open(mntpnt, O_TMPFILE | O_RDWR | O_EXCL, 0600);
> > > if (fd >= 0 &&
> > > xfstests_statx(fd, "", AT_EMPTY_PATH, STATX_DIOALIGN, &stx) == 0 &&
> > > - (stx.stx_mask & STATX_DIOALIGN))
> > > + (stx.stx_mask & STATX_DIOALIGN) && stx.stx_dio_offset_align)
> > > return stx.stx_dio_offset_align;
> > >
> > > /*
> > > --
> > > 2.34.1
> > >
> > >
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] check stx_dio_offset_align to determine if DIO is supported
2024-10-07 12:14 ` Filipe Manana
@ 2024-10-11 5:50 ` Zorro Lang
0 siblings, 0 replies; 5+ messages in thread
From: Zorro Lang @ 2024-10-11 5:50 UTC (permalink / raw)
To: Filipe Manana; +Cc: fstests
On Mon, Oct 07, 2024 at 01:14:09PM +0100, Filipe Manana wrote:
> On Mon, Sep 23, 2024 at 2:46 PM Zorro Lang <zlang@redhat.com> wrote:
> >
> > On Mon, Sep 23, 2024 at 12:01:22PM +0100, Filipe Manana wrote:
> > > On Mon, Sep 23, 2024 at 10:06 AM Wu Bo <wubo.oduw@gmail.com> wrote:
> > > >
> > > > According to the statx manual, if stx_dio_offset_align is 0, it
> > > > indicates that Direct I/O (DIO) is not supported on this file.
> > >
> > > There's already a patch for this:
> > >
> > > https://lore.kernel.org/fstests/20240911035333.364961-1-chao@kernel.org/
> > >
> > > (but not merged yet)
> >
> > Thanks Filipe. Yes, this's fixed by Chao Yu. You can check it in
> > "patches-in-queue" branch, it'll be merged to for-next soon (this
> > week I hope).
>
> It missed the last update and it's still not in the "patches-in-queue" branch.
Yes, sorry I missed that patch, my bad. It'll be in the release of this weekend,
I'm sure about that :)
>
> Thanks.
>
> >
> > Thanks,
> > Zorro
> >
> > >
> > > Thanks.
> > >
> > > >
> > > > Signed-off-by: Wu Bo <wubo.oduw@gmail.com>
> > > > ---
> > > > src/min_dio_alignment.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/src/min_dio_alignment.c b/src/min_dio_alignment.c
> > > > index 131f6023..c50ae8c3 100644
> > > > --- a/src/min_dio_alignment.c
> > > > +++ b/src/min_dio_alignment.c
> > > > @@ -28,7 +28,7 @@ static int min_dio_alignment(const char *mntpnt, const char *devname)
> > > > fd = open(mntpnt, O_TMPFILE | O_RDWR | O_EXCL, 0600);
> > > > if (fd >= 0 &&
> > > > xfstests_statx(fd, "", AT_EMPTY_PATH, STATX_DIOALIGN, &stx) == 0 &&
> > > > - (stx.stx_mask & STATX_DIOALIGN))
> > > > + (stx.stx_mask & STATX_DIOALIGN) && stx.stx_dio_offset_align)
> > > > return stx.stx_dio_offset_align;
> > > >
> > > > /*
> > > > --
> > > > 2.34.1
> > > >
> > > >
> > >
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-11 5:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 9:06 [PATCH] check stx_dio_offset_align to determine if DIO is supported Wu Bo
2024-09-23 11:01 ` Filipe Manana
2024-09-23 13:46 ` Zorro Lang
2024-10-07 12:14 ` Filipe Manana
2024-10-11 5:50 ` Zorro Lang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox