NFSv4.1 Fix gdia_maxcount calculation to fit in ca_maxresponsesize
The GETDEVICEINFO gdia_maxcount represents all of the data being returned within the GETDEVICEINFO4resok structure and includes the XDR overhead. The CREATE_SESSION ca_maxresponsesize is the maximum reply and includes the RPC headers (including security flavor credentials and verifiers). Split out the struct pnfs_device field maxcount which is the gdia_maxcount from the pglen field which is the reply (the total) buffer length. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:

committed by
Trond Myklebust

parent
ffa57b9e53
commit
f1c097be2b
@@ -149,9 +149,10 @@ struct pnfs_device {
|
||||
struct nfs4_deviceid dev_id;
|
||||
unsigned int layout_type;
|
||||
unsigned int mincount;
|
||||
unsigned int maxcount; /* gdia_maxcount */
|
||||
struct page **pages;
|
||||
unsigned int pgbase;
|
||||
unsigned int pglen;
|
||||
unsigned int pglen; /* reply buffer length */
|
||||
};
|
||||
|
||||
#define NFS4_PNFS_GETDEVLIST_MAXNUM 16
|
||||
|
Reference in New Issue
Block a user