* [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
@ 2025-10-01 22:28 Dai Ngo
2025-10-01 23:53 ` Trond Myklebust
2025-10-02 8:22 ` READ_PLUS broken in Linux 6.12, worked in Linux 5.10! " Aurélien Couderc
0 siblings, 2 replies; 7+ messages in thread
From: Dai Ngo @ 2025-10-01 22:28 UTC (permalink / raw)
To: Jorge.Mora; +Cc: linux-nfs
From: Oracle Public Cloud User <opc@dngo-nfstest-client.allregionaliads.osdevelopmeniad.oraclevcn.com>
Check for nfs_version >= 4.2 and use READ_PLUS instead of READ.
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
---
test/nfstest_dio | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/test/nfstest_dio b/test/nfstest_dio
index 093e552..653a842 100755
--- a/test/nfstest_dio
+++ b/test/nfstest_dio
@@ -617,6 +617,8 @@ class DioTest(TestUtil):
if nfs_version < 4:
match_str = "NFS.argop == %d and NFS.fh == b'%s'" % (NFSPROC3_READ, self.pktt.escape(filehandle))
+ elif nfs_version >= 4.2:
+ match_str = "NFS.argop == %d and NFS.stateid.other == b'%s'" % (OP_READ_PLUS, self.pktt.escape(stateid))
else:
match_str = "NFS.argop == %d and NFS.stateid.other == b'%s'" % (OP_READ, self.pktt.escape(stateid))
@@ -744,9 +746,13 @@ class DioTest(TestUtil):
fd = None
bfd = None
ofd = None
- io_str = "WRITE" if write else "READ"
+ if self.nfs_version >= 4.2:
+ io_str = "WRITE" if write else "READ_PLUS"
+ bio_str = "WRITE" if buffered_write else "READ_PLUS"
+ else:
+ io_str = "WRITE" if write else "READ"
+ bio_str = "WRITE" if buffered_write else "READ"
io_mode = posix.O_WRONLY|posix.O_CREAT if write else posix.O_RDONLY
- bio_str = "WRITE" if buffered_write else "READ"
bio_mode = os.O_WRONLY|os.O_CREAT if buffered_write else os.O_RDONLY
if not bsize:
@@ -861,6 +867,8 @@ class DioTest(TestUtil):
if nfs_version < 4:
io_op = NFSPROC3_WRITE if write else NFSPROC3_READ
+ elif nfs_version >= 4.2:
+ io_op = OP_WRITE if write else OP_READ_PLUS
else:
io_op = OP_WRITE if write else OP_READ
@@ -985,6 +993,8 @@ class DioTest(TestUtil):
if nfs_version < 4:
bio_op = NFSPROC3_WRITE if buffered_write else NFSPROC3_READ
+ elif nfs_version >= 4.2:
+ bio_op = OP_WRITE if buffered_write else OP_READ_PLUS
else:
bio_op = OP_WRITE if buffered_write else OP_READ
@@ -1270,6 +1280,8 @@ class DioTest(TestUtil):
if nfs_version < 4:
io_op = NFSPROC3_WRITE if write else NFSPROC3_READ
+ elif nfs_version >= 4.2:
+ io_op = OP_WRITE if write else OP_READ_PLUS
else:
io_op = OP_WRITE if write else OP_READ
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
2025-10-01 22:28 [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio Dai Ngo
@ 2025-10-01 23:53 ` Trond Myklebust
2025-10-02 4:00 ` Dai Ngo
2025-10-02 8:25 ` pahtconf() api to test for sparse file support? " Aurélien Couderc
2025-10-02 8:22 ` READ_PLUS broken in Linux 6.12, worked in Linux 5.10! " Aurélien Couderc
1 sibling, 2 replies; 7+ messages in thread
From: Trond Myklebust @ 2025-10-01 23:53 UTC (permalink / raw)
To: Dai Ngo, Jorge.Mora; +Cc: linux-nfs
On Wed, 2025-10-01 at 15:28 -0700, Dai Ngo wrote:
> From: Oracle Public Cloud User
> <opc@dngo-nfstest-client.allregionaliads.osdevelopmeniad.oraclevcn.co
> m>
>
> Check for nfs_version >= 4.2 and use READ_PLUS instead of READ.
Hrmm... READ_PLUS is (like all NFSv4.2 features) optional to implement.
As such, you really should expect that a server implementation is
perfectly within its rights to return NFS4ERR_NOTSUPP, in which case
the client should fall back to using READ.
>
> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
> ---
> test/nfstest_dio | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/test/nfstest_dio b/test/nfstest_dio
> index 093e552..653a842 100755
> --- a/test/nfstest_dio
> +++ b/test/nfstest_dio
> @@ -617,6 +617,8 @@ class DioTest(TestUtil):
>
> if nfs_version < 4:
> match_str = "NFS.argop == %d and NFS.fh == b'%s'" %
> (NFSPROC3_READ, self.pktt.escape(filehandle))
> + elif nfs_version >= 4.2:
> + match_str = "NFS.argop == %d and NFS.stateid.other
> == b'%s'" % (OP_READ_PLUS, self.pktt.escape(stateid))
> else:
> match_str = "NFS.argop == %d and NFS.stateid.other
> == b'%s'" % (OP_READ, self.pktt.escape(stateid))
>
> @@ -744,9 +746,13 @@ class DioTest(TestUtil):
> fd = None
> bfd = None
> ofd = None
> - io_str = "WRITE" if write else "READ"
> + if self.nfs_version >= 4.2:
> + io_str = "WRITE" if write else "READ_PLUS"
> + bio_str = "WRITE" if buffered_write else
> "READ_PLUS"
> + else:
> + io_str = "WRITE" if write else "READ"
> + bio_str = "WRITE" if buffered_write else "READ"
> io_mode = posix.O_WRONLY|posix.O_CREAT if write else
> posix.O_RDONLY
> - bio_str = "WRITE" if buffered_write else "READ"
> bio_mode = os.O_WRONLY|os.O_CREAT if buffered_write else
> os.O_RDONLY
>
> if not bsize:
> @@ -861,6 +867,8 @@ class DioTest(TestUtil):
>
> if nfs_version < 4:
> io_op = NFSPROC3_WRITE if write else NFSPROC3_READ
> + elif nfs_version >= 4.2:
> + io_op = OP_WRITE if write else OP_READ_PLUS
> else:
> io_op = OP_WRITE if write else OP_READ
>
> @@ -985,6 +993,8 @@ class DioTest(TestUtil):
>
> if nfs_version < 4:
> bio_op = NFSPROC3_WRITE if buffered_write else
> NFSPROC3_READ
> + elif nfs_version >= 4.2:
> + bio_op = OP_WRITE if buffered_write else
> OP_READ_PLUS
> else:
> bio_op = OP_WRITE if buffered_write else OP_READ
>
> @@ -1270,6 +1280,8 @@ class DioTest(TestUtil):
>
> if nfs_version < 4:
> io_op = NFSPROC3_WRITE if write else NFSPROC3_READ
> + elif nfs_version >= 4.2:
> + io_op = OP_WRITE if write else OP_READ_PLUS
> else:
> io_op = OP_WRITE if write else OP_READ
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
2025-10-01 23:53 ` Trond Myklebust
@ 2025-10-02 4:00 ` Dai Ngo
2025-10-02 8:25 ` pahtconf() api to test for sparse file support? " Aurélien Couderc
1 sibling, 0 replies; 7+ messages in thread
From: Dai Ngo @ 2025-10-02 4:00 UTC (permalink / raw)
To: Trond Myklebust, Jorge.Mora; +Cc: linux-nfs
On 10/1/25 4:53 PM, Trond Myklebust wrote:
> On Wed, 2025-10-01 at 15:28 -0700, Dai Ngo wrote:
>> From: Oracle Public Cloud User
>> <opc@dngo-nfstest-client.allregionaliads.osdevelopmeniad.oraclevcn.co
>> m>
>>
>> Check for nfs_version >= 4.2 and use READ_PLUS instead of READ.
> Hrmm... READ_PLUS is (like all NFSv4.2 features) optional to implement.
> As such, you really should expect that a server implementation is
> perfectly within its rights to return NFS4ERR_NOTSUPP, in which case
> the client should fall back to using READ.
Thank you for your comments Trond. I'll submit another patch, if Jorge has done
it yet, that probes the server's support for 4.2 reads and use it appropriately
in the test.
My initial patch was written with only the Linux NFSD in mind.
-Dai
>
>> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
>> ---
>> test/nfstest_dio | 16 ++++++++++++++--
>> 1 file changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/test/nfstest_dio b/test/nfstest_dio
>> index 093e552..653a842 100755
>> --- a/test/nfstest_dio
>> +++ b/test/nfstest_dio
>> @@ -617,6 +617,8 @@ class DioTest(TestUtil):
>>
>> if nfs_version < 4:
>> match_str = "NFS.argop == %d and NFS.fh == b'%s'" %
>> (NFSPROC3_READ, self.pktt.escape(filehandle))
>> + elif nfs_version >= 4.2:
>> + match_str = "NFS.argop == %d and NFS.stateid.other
>> == b'%s'" % (OP_READ_PLUS, self.pktt.escape(stateid))
>> else:
>> match_str = "NFS.argop == %d and NFS.stateid.other
>> == b'%s'" % (OP_READ, self.pktt.escape(stateid))
>>
>> @@ -744,9 +746,13 @@ class DioTest(TestUtil):
>> fd = None
>> bfd = None
>> ofd = None
>> - io_str = "WRITE" if write else "READ"
>> + if self.nfs_version >= 4.2:
>> + io_str = "WRITE" if write else "READ_PLUS"
>> + bio_str = "WRITE" if buffered_write else
>> "READ_PLUS"
>> + else:
>> + io_str = "WRITE" if write else "READ"
>> + bio_str = "WRITE" if buffered_write else "READ"
>> io_mode = posix.O_WRONLY|posix.O_CREAT if write else
>> posix.O_RDONLY
>> - bio_str = "WRITE" if buffered_write else "READ"
>> bio_mode = os.O_WRONLY|os.O_CREAT if buffered_write else
>> os.O_RDONLY
>>
>> if not bsize:
>> @@ -861,6 +867,8 @@ class DioTest(TestUtil):
>>
>> if nfs_version < 4:
>> io_op = NFSPROC3_WRITE if write else NFSPROC3_READ
>> + elif nfs_version >= 4.2:
>> + io_op = OP_WRITE if write else OP_READ_PLUS
>> else:
>> io_op = OP_WRITE if write else OP_READ
>>
>> @@ -985,6 +993,8 @@ class DioTest(TestUtil):
>>
>> if nfs_version < 4:
>> bio_op = NFSPROC3_WRITE if buffered_write else
>> NFSPROC3_READ
>> + elif nfs_version >= 4.2:
>> + bio_op = OP_WRITE if buffered_write else
>> OP_READ_PLUS
>> else:
>> bio_op = OP_WRITE if buffered_write else OP_READ
>>
>> @@ -1270,6 +1280,8 @@ class DioTest(TestUtil):
>>
>> if nfs_version < 4:
>> io_op = NFSPROC3_WRITE if write else NFSPROC3_READ
>> + elif nfs_version >= 4.2:
>> + io_op = OP_WRITE if write else OP_READ_PLUS
>> else:
>> io_op = OP_WRITE if write else OP_READ
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* READ_PLUS broken in Linux 6.12, worked in Linux 5.10! Re: [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
2025-10-01 22:28 [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio Dai Ngo
2025-10-01 23:53 ` Trond Myklebust
@ 2025-10-02 8:22 ` Aurélien Couderc
2025-10-30 10:54 ` Aurélien Couderc
1 sibling, 1 reply; 7+ messages in thread
From: Aurélien Couderc @ 2025-10-02 8:22 UTC (permalink / raw)
To: linux-nfs
On Thu, Oct 2, 2025 at 12:29 AM Dai Ngo <dai.ngo@oracle.com> wrote:
>
> From: Oracle Public Cloud User <opc@dngo-nfstest-client.allregionaliads.osdevelopmeniad.oraclevcn.com>
>
> Check for nfs_version >= 4.2 and use READ_PLUS instead of READ.
FYI READ_PLUS is **BROKEN** for sparse files. It was working in Linux
5.10, but as soon as we switched to Linux 6.12 it reported only data
and no holes in sparse files. We're back to Linux 5.10 and cannot
upgrade because of this.
Aurélien
--
Aurélien Couderc <aurelien.couderc2002@gmail.com>
Big Data/Data mining expert, chess enthusiast
^ permalink raw reply [flat|nested] 7+ messages in thread
* pahtconf() api to test for sparse file support? Re: [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
2025-10-01 23:53 ` Trond Myklebust
2025-10-02 4:00 ` Dai Ngo
@ 2025-10-02 8:25 ` Aurélien Couderc
1 sibling, 0 replies; 7+ messages in thread
From: Aurélien Couderc @ 2025-10-02 8:25 UTC (permalink / raw)
To: linux-nfs
On Thu, Oct 2, 2025 at 1:53 AM Trond Myklebust <trondmy@kernel.org> wrote:
>
> On Wed, 2025-10-01 at 15:28 -0700, Dai Ngo wrote:
> > From: Oracle Public Cloud User
> > <opc@dngo-nfstest-client.allregionaliads.osdevelopmeniad.oraclevcn.co
> > m>
> >
> > Check for nfs_version >= 4.2 and use READ_PLUS instead of READ.
>
> Hrmm... READ_PLUS is (like all NFSv4.2 features) optional to implement.
READ_PLUS is needed for sparse file support.
I am really starting to wonder whether there should be a pathconf()
api to check whether sparse files are supported, i.e. NFSv4.2 SEEK and
NFSv4.2 READ_PLUS are possible for a file.
Aurélien
--
Aurélien Couderc <aurelien.couderc2002@gmail.com>
Big Data/Data mining expert, chess enthusiast
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: READ_PLUS broken in Linux 6.12, worked in Linux 5.10! Re: [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
2025-10-02 8:22 ` READ_PLUS broken in Linux 6.12, worked in Linux 5.10! " Aurélien Couderc
@ 2025-10-30 10:54 ` Aurélien Couderc
2025-10-30 13:10 ` Chuck Lever
0 siblings, 1 reply; 7+ messages in thread
From: Aurélien Couderc @ 2025-10-30 10:54 UTC (permalink / raw)
To: linux-nfs
On Thu, Oct 2, 2025 at 10:22 AM Aurélien Couderc
<aurelien.couderc2002@gmail.com> wrote:
>
> On Thu, Oct 2, 2025 at 12:29 AM Dai Ngo <dai.ngo@oracle.com> wrote:
> >
> > From: Oracle Public Cloud User <opc@dngo-nfstest-client.allregionaliads.osdevelopmeniad.oraclevcn.com>
> >
> > Check for nfs_version >= 4.2 and use READ_PLUS instead of READ.
>
> FYI READ_PLUS is **BROKEN** for sparse files. It was working in Linux
> 5.10, but as soon as we switched to Linux 6.12 it reported only data
> and no holes in sparse files. We're back to Linux 5.10 and cannot
> upgrade because of this.
Is there any bug tracker where I can post this Linux NFS server bug?
Aurélien
--
Aurélien Couderc <aurelien.couderc2002@gmail.com>
Big Data/Data mining expert, chess enthusiast
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: READ_PLUS broken in Linux 6.12, worked in Linux 5.10! Re: [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
2025-10-30 10:54 ` Aurélien Couderc
@ 2025-10-30 13:10 ` Chuck Lever
0 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2025-10-30 13:10 UTC (permalink / raw)
To: Aurélien Couderc, linux-nfs
On 10/30/25 6:54 AM, Aurélien Couderc wrote:
> On Thu, Oct 2, 2025 at 10:22 AM Aurélien Couderc
> <aurelien.couderc2002@gmail.com> wrote:
>>
>> On Thu, Oct 2, 2025 at 12:29 AM Dai Ngo <dai.ngo@oracle.com> wrote:
>>>
>>> From: Oracle Public Cloud User <opc@dngo-nfstest-client.allregionaliads.osdevelopmeniad.oraclevcn.com>
>>>
>>> Check for nfs_version >= 4.2 and use READ_PLUS instead of READ.
>>
>> FYI READ_PLUS is **BROKEN** for sparse files. It was working in Linux
>> 5.10, but as soon as we switched to Linux 6.12 it reported only data
>> and no holes in sparse files. We're back to Linux 5.10 and cannot
>> upgrade because of this.
>
> Is there any bug tracker where I can post this Linux NFS server bug?
https://bugzilla.kernel.org, Product "File Systems", Component "NFSD"
--
Chuck Lever
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-10-30 13:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-01 22:28 [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio Dai Ngo
2025-10-01 23:53 ` Trond Myklebust
2025-10-02 4:00 ` Dai Ngo
2025-10-02 8:25 ` pahtconf() api to test for sparse file support? " Aurélien Couderc
2025-10-02 8:22 ` READ_PLUS broken in Linux 6.12, worked in Linux 5.10! " Aurélien Couderc
2025-10-30 10:54 ` Aurélien Couderc
2025-10-30 13:10 ` Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).