I don’t think that we are violating the RFC but I think we can use better responses to the
client.
My servers do both MDS and DS so this what I see going back to the client
1. If eia_flags == 0
server_pnfs_flags |= EXCHGID4_FLAG_USE_PNFS_DS | EXCHGID4_FLAG_USE_PNFS_MDS
1. If eia_flags == EXCHGID4_FLAG_USE_PNFS_DS
server_pnfs_flags |= EXCHGID4_FLAG_USE_PNFS_DS | EXCHGID4_FLAG_USE_NON_PNFS
I would expect that for both we would return
EXCHGID4_FLAG_USE_PNFS_DS | EXCHGID4_FLAG_USE_PNFS_MDS
Marc.
From: Assaf Yaari <assafy(a)google.com>
Date: Wednesday, August 14, 2024 at 2:46 AM
To: Marc Eshel <eshel(a)us.ibm.com>
Cc: Frank Stewart Filz <ffilz(a)ibm.com>, devel(a)lists.nfs-ganesha.org
<devel(a)lists.nfs-ganesha.org>
Subject: [EXTERNAL] Re: pNFS related commit a48cfbd5f9cfdf259136e0cf1f4bfc134ce8b8d8
Hi Marc, The case that the client did sent pNFS flag is covered by the 'else' of
this condition: } /* If client did ask for pNFS related server roles than try to match the
server roles to the client request. */ else { if ((arg_EXCHANGE_ID4->eia_flags
Hi Marc,
The case that the client did sent pNFS flag is covered by the 'else' of this
condition:
}
/* If client did ask for pNFS related server roles than try to match the
server roles to the client request. */
else {
if ((arg_EXCHANGE_ID4->eia_flags & EXCHGID4_FLAG_USE_PNFS_MDS)
&& (nfs_param.nfsv4_param.pnfs_mds))
server_pnfs_flags |= EXCHGID4_FLAG_USE_PNFS_MDS;
else
server_pnfs_flags |= EXCHGID4_FLAG_USE_NON_PNFS;
if ((arg_EXCHANGE_ID4->eia_flags & EXCHGID4_FLAG_USE_PNFS_DS)
&& (nfs_param.nfsv4_param.pnfs_ds))
server_pnfs_flags |= EXCHGID4_FLAG_USE_PNFS_DS;
}
I believe that the above conforms to RFC 8881 section 13.1.
The first block section that you refer to, covers the case when the client doesn't
send any pNFS flags so you should not modify the condition.
Regarding the other issue that you wrote - pNFS is NFSv4.1(2) specific so it seems to me
reasonable that it will be in the NFSv4 config block.
Are you saying that you want the freedom to configure the pNFS abilities per share?
As our product doesn't support pNFS I don't have strong thoughts about that. I
advise that you continue this discussion with Frank.
Regards,
Assaf Y.
On Wed, Aug 14, 2024 at 6:26 AM Marc Eshel
<eshel@us.ibm.com<mailto:eshel@us.ibm.com>> wrote:
Hi Assf,
I believe that we need the following change in the code that you changed last year. I am
starting to test pNFS and if the client has any flags on in the pNFS mask we should check
the clients request.
diff --git a/src/Protocols/NFS/nfs4_op_exchange_id.c
b/src/Protocols/NFS/nfs4_op_exchange_id.c
index 15bb386fe..a6b730308 100644
--- a/src/Protocols/NFS/nfs4_op_exchange_id.c
+++ b/src/Protocols/NFS/nfs4_op_exchange_id.c
@@ -172,7 +172,7 @@ enum nfs_req_result nfs4_op_exchange_id(struct nfs_argop4 *op,
/* If client did not ask for pNFS related server roles than just set
server roles */
- if ((arg_EXCHANGE_ID4->eia_flags & EXCHGID4_FLAG_MASK_PNFS) == 0) {
+ if (arg_EXCHANGE_ID4->eia_flags & EXCHGID4_FLAG_MASK_PNFS) {
if (nfs_param.nfsv4_param.pnfs_mds)
server_pnfs_flags |= EXCHGID4_FLAG_USE_PNFS_MDS;
else
On another issue if you are familiar with pNFS code, it is checking the pNFS flags only
in the NFSv4 block
I think it should be at the EXPORT block.
NFSv4
{
PNFS_MDS = true;
PNFS_DS = true;
}
Thanks, Marc.
--
[Image removed by sender.]
Assaf Yaari
assafy@google.com<mailto:assafy@google.com>
SWE
+972-54-2444-360