diff mbox series

[4/5] generic: don't use _min_dio_alignment without a device argument

Message ID 20240813073527.81072-5-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/5] statx.h: update to latest kernel UAPI | expand

Commit Message

Christoph Hellwig Aug. 13, 2024, 7:35 a.m. UTC
Replace calls to _min_dio_alignment that do not provide a device to
check with calls to the feature utility to query the page size, as that
is what these calls actually do.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/generic/521 | 2 +-
 tests/generic/617 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Darrick J. Wong Aug. 13, 2024, 2:43 p.m. UTC | #1
On Tue, Aug 13, 2024 at 09:35:03AM +0200, Christoph Hellwig wrote:
> Replace calls to _min_dio_alignment that do not provide a device to
> check with calls to the feature utility to query the page size, as that
> is what these calls actually do.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/generic/521 | 2 +-
>  tests/generic/617 | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/generic/521 b/tests/generic/521
> index 24eab8342..5f3aac570 100755
> --- a/tests/generic/521
> +++ b/tests/generic/521
> @@ -22,7 +22,7 @@ nr_ops=$((1000000 * TIME_FACTOR))
>  op_sz=$((128000 * LOAD_FACTOR))
>  file_sz=$((600000 * LOAD_FACTOR))
>  fsx_file=$TEST_DIR/fsx.$seq
> -min_dio_sz=$(_min_dio_alignment)
> +min_dio_sz=$($here/src/feature -s)

Or maybe _get_page_size() ?

Don't really care either way so:
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

>  
>  fsx_args=(-q)
>  fsx_args+=(-N $nr_ops)
> diff --git a/tests/generic/617 b/tests/generic/617
> index eb50a2da3..297d75538 100755
> --- a/tests/generic/617
> +++ b/tests/generic/617
> @@ -24,7 +24,7 @@ nr_ops=$((20000 * TIME_FACTOR))
>  op_sz=$((128000 * LOAD_FACTOR))
>  file_sz=$((600000 * LOAD_FACTOR))
>  fsx_file=$TEST_DIR/fsx.$seq
> -min_dio_sz=$(_min_dio_alignment)
> +min_dio_sz=$($here/src/feature -s)
>  
>  fsx_args=(-S 0)
>  fsx_args+=(-U)
> -- 
> 2.43.0
> 
>
Christoph Hellwig Aug. 13, 2024, 2:56 p.m. UTC | #2
On Tue, Aug 13, 2024 at 07:43:31AM -0700, Darrick J. Wong wrote:
> > +min_dio_sz=$($here/src/feature -s)
> 
> Or maybe _get_page_size() ?

Sure.  Or maybe actually query the I/O size, but I need feedback
from the authors that they actually intended that..
diff mbox series

Patch

diff --git a/tests/generic/521 b/tests/generic/521
index 24eab8342..5f3aac570 100755
--- a/tests/generic/521
+++ b/tests/generic/521
@@ -22,7 +22,7 @@  nr_ops=$((1000000 * TIME_FACTOR))
 op_sz=$((128000 * LOAD_FACTOR))
 file_sz=$((600000 * LOAD_FACTOR))
 fsx_file=$TEST_DIR/fsx.$seq
-min_dio_sz=$(_min_dio_alignment)
+min_dio_sz=$($here/src/feature -s)
 
 fsx_args=(-q)
 fsx_args+=(-N $nr_ops)
diff --git a/tests/generic/617 b/tests/generic/617
index eb50a2da3..297d75538 100755
--- a/tests/generic/617
+++ b/tests/generic/617
@@ -24,7 +24,7 @@  nr_ops=$((20000 * TIME_FACTOR))
 op_sz=$((128000 * LOAD_FACTOR))
 file_sz=$((600000 * LOAD_FACTOR))
 fsx_file=$TEST_DIR/fsx.$seq
-min_dio_sz=$(_min_dio_alignment)
+min_dio_sz=$($here/src/feature -s)
 
 fsx_args=(-S 0)
 fsx_args+=(-U)