diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-10 17:36:30 -0700 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-09-12 13:22:45 -0400 |
commit | 34dc93c2fc04da0d01acf8a1660b4ab276208af7 (patch) | |
tree | 89c6c0dbc294682703f7172e1285a8bf5245ce52 /fs/nfs/blocklayout/blocklayout.h | |
parent | d4b18c3e00b8d18fbd316abe9639b91ad416e1f3 (diff) | |
download | linux-34dc93c2fc04da0d01acf8a1660b4ab276208af7.tar.gz linux-34dc93c2fc04da0d01acf8a1660b4ab276208af7.tar.bz2 linux-34dc93c2fc04da0d01acf8a1660b4ab276208af7.zip |
pnfs/blocklayout: allocate separate pages for the layoutcommit payload
Instead of overflowing the XDR send buffer with our extent list allocate
pages and pre-encode the layoutupdate payload into them. We optimistically
allocate a single page use alloc_page and only switch to vmalloc when we
have more extents outstanding. Currently there is only a single testcase
(xfstests generic/113) which can reproduce large enough extent lists for
this to occur.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/blocklayout/blocklayout.h')
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h index 19fae5e4c90b..9757f3eabdd2 100644 --- a/fs/nfs/blocklayout/blocklayout.h +++ b/fs/nfs/blocklayout/blocklayout.h @@ -72,6 +72,9 @@ struct pnfs_block_extent { unsigned int be_tag; }; +/* on the wire size of the extent */ +#define BL_EXTENT_SIZE (7 * sizeof(__be32) + NFS4_DEVICEID4_SIZE) + struct pnfs_block_layout { struct pnfs_layout_hdr bl_layout; struct rb_root bl_ext_rw; @@ -129,8 +132,7 @@ int ext_tree_mark_written(struct pnfs_block_layout *bl, sector_t start, sector_t len); bool ext_tree_lookup(struct pnfs_block_layout *bl, sector_t isect, struct pnfs_block_extent *ret, bool rw); -int ext_tree_encode_commit(struct pnfs_block_layout *bl, - struct xdr_stream *xdr); -void ext_tree_mark_committed(struct pnfs_block_layout *bl, int status); +int ext_tree_prepare_commit(struct nfs4_layoutcommit_args *arg); +void ext_tree_mark_committed(struct nfs4_layoutcommit_args *arg, int status); #endif /* FS_NFS_NFS4BLOCKLAYOUT_H */ |