summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorBenny Halevy <benny@tonian.com>2011-06-20 00:33:46 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-06-20 22:12:26 +0200
commit19345cb299e8234006c5125151ab723e851a1d24 (patch)
tree43bde1db751eb50afbdabfbd26814431c8be573c /fs/nfs/nfs4filelayout.c
parentpnfs-obj: No longer needed to take an extra ref at add_device (diff)
downloadlinux-19345cb299e8234006c5125151ab723e851a1d24.tar.xz
linux-19345cb299e8234006c5125151ab723e851a1d24.zip
NFSv4.1: file layout must consider pg_bsize for coalescing
Otherwise we end up overflowing the rpc buffer size on the receive end. Signed-off-by: Benny Halevy <benny@tonian.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 5d6f369b15d0..0bafcc91c27f 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -30,6 +30,7 @@
*/
#include <linux/nfs_fs.h>
+#include <linux/nfs_page.h>
#include "internal.h"
#include "nfs4filelayout.h"
@@ -666,8 +667,9 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
u64 p_stripe, r_stripe;
u32 stripe_unit;
- if (!pnfs_generic_pg_test(pgio, prev, req))
- return 0;
+ if (!pnfs_generic_pg_test(pgio, prev, req) ||
+ !nfs_generic_pg_test(pgio, prev, req))
+ return false;
if (!pgio->pg_lseg)
return 1;