summaryrefslogtreecommitdiff
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-12-31 09:28:06 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-31 15:55:35 -0500
commitb20135d0b2431900a3a5395970ffb7e4f3767c8b (patch)
tree480ca93f19626e451cb79b35f29ad86d28da0fbb /fs/nfs/pnfs.h
parentaf7cf057933f01dc7f33ddfb5e436ad598ed17ad (diff)
NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid
If the layout segment is invalid, then we should not be adding more write requests to the commit list. Instead, those writes should be replayed after requesting a new layout. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index d93c2ebc0fd3..4bd7faf9ce50 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -412,6 +412,12 @@ pnfs_get_lseg(struct pnfs_layout_segment *lseg)
return lseg;
}
+static inline bool
+pnfs_is_valid_lseg(struct pnfs_layout_segment *lseg)
+{
+ return test_bit(NFS_LSEG_VALID, &lseg->pls_flags) != 0;
+}
+
/* Return true if a layout driver is being used for this mountpoint */
static inline int pnfs_enabled_sb(struct nfs_server *nfss)
{