summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorChristoph Hellwig2014-08-21 18:09:22 +0200
committerTrond Myklebust2014-09-10 21:47:01 +0200
commit47abadefad213bb7de9592d2e09a8bd282ddc3de (patch)
tree654dab2b331441f3a823a33ad1912578459f6cd9 /fs/nfs/pnfs.h
parentpnfs: retry after a bad stateid error from layoutget (diff)
downloadkernel-qcow2-linux-47abadefad213bb7de9592d2e09a8bd282ddc3de.tar.gz
kernel-qcow2-linux-47abadefad213bb7de9592d2e09a8bd282ddc3de.tar.xz
kernel-qcow2-linux-47abadefad213bb7de9592d2e09a8bd282ddc3de.zip
pnfs: avoid using stale stateids after layoutreturn
After we issued a layoutreturn operations the may free the layout stateid and will thus cause bad stateid error when the client uses it again. We currently try to avoid this case by chosing the open stateid if not lsegs are present for this inode. But various places can hold refererence on lsegs and thus cause the list not to be empty shortly after a layout return. Add an explicit flag to mark the current layout stateid invalid and force usage of the openstateid after we did a full file layoutreturn. 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 79c63114ce77..1dd8a5e96c9f 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -65,6 +65,7 @@ enum {
NFS_LAYOUT_BULK_RECALL, /* bulk recall affecting layout */
NFS_LAYOUT_ROC, /* some lseg had roc bit set */
NFS_LAYOUT_RETURN, /* Return this layout ASAP */
+ NFS_LAYOUT_INVALID_STID, /* layout stateid id is invalid */
};
enum layoutdriver_policy_flags {