pNFS/flexfiles: Ensure we have enough buffer for layoutreturn

The flexfiles client can piggyback both layout errors and layoutstats
as part of the layoutreturn. Both these payloads can get large, with
20 layout error entries taking up about 1.2K, and 4 layoutstats entries
taking up another 1K.
This patch allows a maximum payload of 4k by allocating a full page.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
Trond Myklebust
2016-12-09 18:07:51 -05:00
parent 5ba6a09e92
commit d9152114f7
2 changed files with 27 additions and 6 deletions

View File

@@ -113,6 +113,7 @@ struct nfs4_flexfile_layoutreturn_args {
struct nfs42_layoutstat_devinfo devinfo[FF_LAYOUTSTATS_MAXDEV];
unsigned int num_errors;
unsigned int num_dev;
struct page *pages[1];
};
static inline struct nfs4_flexfile_layout *