NFSv3: Improve NFSv3 performance when server returns no post-op attributes

When the server fails to return post-op attributes, the client's
attempt to place read data directly in the page cache fails, and
so we have to do an extra copy in order to realign the data with
page borders.
This patch attempts to detect servers that don't return post-op
attributes on read (e.g. for pNFS) and adjusts the placement
calculation accordingly.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
Trond Myklebust 2018-03-05 12:03:00 -05:00 committed by Trond Myklebust
parent 80f4236886
commit 8d8928d879
4 changed files with 15 additions and 2 deletions

View file

@ -608,6 +608,7 @@ struct nfs_pgio_args {
__u32 count;
unsigned int pgbase;
struct page ** pages;
unsigned int replen; /* used by read */
const u32 * bitmask; /* used by write */
enum nfs3_stable_how stable; /* used by write */
};
@ -618,9 +619,9 @@ struct nfs_pgio_res {
__u32 count;
__u32 op_status;
int eof; /* used by read */
unsigned int replen; /* used by read */
struct nfs_writeverf * verf; /* used by write */
const struct nfs_server *server; /* used by write */
};
/*