common/nfs: add FSX_AVOID when testing on NFS
PATCH 1/1 common/nfs: add FSX_AVOID when testing on NFS
copy_file_range on NFSv4.2 requires that src offset and dest offset are aligned with server blocksize. So does copy count, except that after this copy, we'll reach the EOF. See Linux commit 811b7b85.
ltp/fsx.c tests copy_file_range on random offset with random size by default. This makes these tests get EINVAL on NFS.
--- common/nfs | 9 +++++++++ 1 file changed, 9 insertions(+)
common/nfs +9 -0
@@ -33,3 +33,12 @@ _require_scratch_nfs_version() fi _scratch_unmount } + +# copy_file_range on NFSv4.2 requires src offset and dest offset +# are aligned with server blocksize. So does copy count, except that +# after this copy, we'll reach the EOF. See Linux commit 811b7b85 +# for details. +# ltp/fsx.c tests copy_file_range on random offset with random size +# by default. This makes these tests get EINVAL on NFS. +# Now add FSX_AVOID to make fsx tests on NFS rational. +FSX_AVOID="-r 4096 -w 4096 -O -o 4096 -Z $FSX_AVOID"
Signature · 1 line
2.17.0.252.gfe0a9ea
Quoted 17 lines · Xiong Murphy Zhou
copy_file_rangeon NFSv4.2 requires that src offset and dest offset are aligned with server blocksize. So does copy count, except that after this copy, we'll reach the EOF. See Linux commit811b7b85.
ltp/fsx.ctestscopy_file_rangeon random offset with random size by default. This makes these tests get EINVAL on NFS.Signed-off-by Xiong Murphy Zhou <[email protected]>--- common/nfs | 9 +++++++++ 1 file changed, 9 insertions(+)common/nfs +0
-0
common/nfs _require_scratch_nfs_version() · line 42
Quoted 10 lines
common/nfs +7
-0@@ -33,3 +33,12 @@ _require_scratch_nfs_version() fi _scratch_unmount } + +# copy_file_range on NFSv4.2 requires src offset and dest offset +# are aligned with server blocksize. So does copy count, except that +# after this copy, we'll reach the EOF. See Linux commit 811b7b85 +# for details. +# ltp/fsx.c tests copy_file_range on random offset with random size +# by default. This makes these tests get EINVAL on NFS.
I think it's more appropriate to fix the vfs copy_file_range to fall back to page cache copy when the nfs server declines to do it.
And, since we already know Dave Chinner is working on that, just wait for the v2 patches.
common/nfs _require_scratch_nfs_version() · line 44
Quoted 2 lines
common/nfs +2
-0+# Now add FSX_AVOID to make fsx tests on NFS rational. +FSX_AVOID="-r 4096 -w 4096 -O -o 4096 -Z $FSX_AVOID"
How do you know the server blocksize is 4k?
Also, this forces /every/ fsx operation to be page aligned directio, I don't think we want to apply such a big hammer.
--D
Quoted 2 lines
2.17.0.252.gfe0a9ea
Quoted 32 lines · Darrick J. Wong
Quoted 17 lines · Xiong Murphy Zhou
copy_file_rangeon NFSv4.2 requires that src offset and dest offset are aligned with server blocksize. So does copy count, except that after this copy, we'll reach the EOF. See Linux commit811b7b85.
ltp/fsx.ctestscopy_file_rangeon random offset with random size by default. This makes these tests get EINVAL on NFS.Signed-off-by Xiong Murphy Zhou <[email protected]>--- common/nfs | 9 +++++++++ 1 file changed, 9 insertions(+)common/nfs +0
-0common/nfs _require_scratch_nfs_version() · line 42
Quoted 10 lines
common/nfs +7
-0@@ -33,3 +33,12 @@ _require_scratch_nfs_version() fi _scratch_unmount } + +# copy_file_range on NFSv4.2 requires src offset and dest offset +# are aligned with server blocksize. So does copy count, except that +# after this copy, we'll reach the EOF. See Linux commit 811b7b85 +# for details. +# ltp/fsx.c tests copy_file_range on random offset with random size +# by default. This makes these tests get EINVAL on NFS.I think it's more appropriate to fix the vfs
copy_file_rangeto fall back to page cache copy when the nfs server declines to do it.
Quoted 2 lines
And, since we already know Dave Chinner is working on that, just wait for the v2 patches.
Great to know that! Thanks for the info!
Quoted 5 lines
common/nfs _require_scratch_nfs_version() · line 44
Quoted 3 lines
common/nfs +2
-0+# Now add FSX_AVOID to make fsx tests on NFS rational. +FSX_AVOID="-r 4096 -w 4096 -O -o 4096 -Z $FSX_AVOID"How do you know the server blocksize is 4k?
Ha, I don't know. Very good point. :)
Quoted 3 lines
Also, this forces /every/ fsx operation to be page aligned directio, I don't think we want to apply such a big hammer.
Adding -Z was to make the IO size aligned with readbdy. O_DIRECT is not necessary here. I just found -Z can do that for me. Maybe we need another option to archive this:
if (some_option) size -= size % readbdy;
in ltp/fsx.c
Thanks for the reviewing!
Xiong
Quoted 5 lines
--D
Quoted 2 lines
2.17.0.252.gfe0a9ea