summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorChristoph Hellwig2014-09-10 17:23:31 +0200
committerTrond Myklebust2014-09-10 21:47:03 +0200
commitc88953d87f5c8cd95bebcbd6d15f2f0cdd348136 (patch)
tree6805b3c8feb934404205d5e79a2cf37dde87647f /fs/nfs/pnfs.h
parentpnfs: add flag to force read-modify-write in ->write_begin (diff)
downloadkernel-qcow2-linux-c88953d87f5c8cd95bebcbd6d15f2f0cdd348136.tar.gz
kernel-qcow2-linux-c88953d87f5c8cd95bebcbd6d15f2f0cdd348136.tar.xz
kernel-qcow2-linux-c88953d87f5c8cd95bebcbd6d15f2f0cdd348136.zip
pnfs: add return_range method
If a layout driver keeps per-inode state outside of the layout segments it needs to be notified of any layout returns or recalls on an inode, and not just about the freeing of layout segments. Add a method to acomplish this, which will allow the block layout driver to handle the case of truncated and re-expanded files properly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index a4c530e52149..2c2494225930 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -94,6 +94,9 @@ struct pnfs_layoutdriver_type {
struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_hdr *layoutid, struct nfs4_layoutget_res *lgr, gfp_t gfp_flags);
void (*free_lseg) (struct pnfs_layout_segment *lseg);
+ void (*return_range) (struct pnfs_layout_hdr *lo,
+ struct pnfs_layout_range *range);
+
/* test for nfs page cache coalescing */
const struct nfs_pageio_ops *pg_read_ops;
const struct nfs_pageio_ops *pg_write_ops;