In the case of a server with concurrent pNFS roles that are served by a common client ID, if the EXCHANGE_ID request from the client has zero or a combination of the bits set in eia_flags, the server result should set bits that represent the higher of the acceptable combination of the server roles, with a preference to match the roles requested by the client. Thus, if a client request has (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS | EXCHGID4_FLAG_USE_PNFS_DS) flags set, and the server is both a metadata server and a data server, serving both the roles by a common client ID, the server SHOULD return with (EXCHGID4_FLAG_USE_PNFS_MDS | EXCHGID4_FLAG_USE_PNFS_DS) set.
In the case of a server that has multiple concurrent pNFS roles, each role served by a unique client ID, if the client specifies zero or a combination of roles in the request, the server results SHOULD return only one of the roles from the combination specified by the client request. If the role specified by the server result does not match the intended use by the client, the client should send the EXCHANGE_ID specifying just the interested pNFS role.
My understanding from that, is that if the client did specify a flag in the eia_flags, then the server should match its capabilities to the requested flag.
Yet, maybe someone else with more experience than me with pNFS can share their POV. Frank?
P.s. my original change was just in order to pass compliance checks so if the server does not have any pNFS capabilities then it must return EXCHGID4_FLAG_USE_NON_PNFS. Before my change it returned 0 which violated the spec.
I haven't really changed the original capabilities matching logic.
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
- If eia_flags == 0
server_pnfs_flags |= EXCHGID4_FLAG_USE_PNFS_DS | EXCHGID4_FLAG_USE_PNFS_MDS
- 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.