Skip to contentSkip to conversation

NFSv4.1: Use session max response size for GETDEVICEINFO gdia_maxcount

PATCH New [email protected] 1 participant 1 message Jun 12, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFSv4.1: Use session max response size for GETDEVICEINFO gdia_maxcount

From: Andy Adamson <[email protected]>

We prepare for the largest possible GETDEVICEINFO response, which can not be greater than the negotiated session maximum response size.

---
 fs/nfs/nfs4filelayoutdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/nfs4filelayoutdev.c +1 -1
index a1fab8d..f81231f 100644
@@ -728,7 +728,7 @@ get_device_info(struct inode *inode, struct nfs4_deviceid *dev_id, gfp_t gfp_fla
 	pdev->layout_type = LAYOUT_NFSV4_1_FILES;
 	pdev->pages = pages;
 	pdev->pgbase = 0;
-	pdev->pglen = PAGE_SIZE * max_pages;
+	pdev->pglen = max_resp_sz;
 	pdev->mincount = 0;
 
 	rc = nfs4_proc_getdeviceinfo(server, pdev);
Signature · 1 line
1.7.6.4