summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorJeff Layton2016-05-17 18:28:42 +0200
committerAnna Schumaker2016-05-17 21:48:10 +0200
commit6d597e1750126a2c6fd99e4b2cc176955bb9972e (patch)
treeaf032e776b004aa26ad48c0e91123253e63b7e37 /fs/nfs/pnfs.h
parentpnfs: keep track of the return sequence number in pnfs_layout_hdr (diff)
downloadkernel-qcow2-linux-6d597e1750126a2c6fd99e4b2cc176955bb9972e.tar.gz
kernel-qcow2-linux-6d597e1750126a2c6fd99e4b2cc176955bb9972e.tar.xz
kernel-qcow2-linux-6d597e1750126a2c6fd99e4b2cc176955bb9972e.zip
pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args
LAYOUTRETURN is "special" in that servers and clients are expected to work with old stateids. When the client sends a LAYOUTRETURN with an old stateid in it then the server is expected to only tear down layout segments that were present when that seqid was current. Ensure that the client handles its accounting accordingly. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 3476c9850678..971068b58647 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -266,10 +266,12 @@ int pnfs_choose_layoutget_stateid(nfs4_stateid *dst,
struct nfs4_state *open_state);
int pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
struct list_head *tmp_list,
- const struct pnfs_layout_range *recall_range);
+ const struct pnfs_layout_range *recall_range,
+ u32 seq);
int pnfs_mark_matching_lsegs_return(struct pnfs_layout_hdr *lo,
struct list_head *tmp_list,
- const struct pnfs_layout_range *recall_range);
+ const struct pnfs_layout_range *recall_range,
+ u32 seq);
bool pnfs_roc(struct inode *ino);
void pnfs_roc_release(struct inode *ino);
void pnfs_roc_set_barrier(struct inode *ino, u32 barrier);