From: Dai Ngo <dai.ngo@oracle.com>
To: Jorge.Mora@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio
Date: Wed, 1 Oct 2025 15:28:53 -0700 [thread overview]
Message-ID: <1759357733-64526-1-git-send-email-dai.ngo@oracle.com> (raw)
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
next reply other threads:[~2025-10-01 22:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 22:28 Dai Ngo [this message]
2025-10-01 23:53 ` [PATCH 1/1] DIO: add NFSv4.2 READ_PLUS support for nfstest_dio 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1759357733-64526-1-git-send-email-dai.ngo@oracle.com \
--to=dai.ngo@oracle.com \
--cc=Jorge.Mora@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).