diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-12-31 15:28:06 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-12-31 21:55:35 +0100 |
commit | b20135d0b2431900a3a5395970ffb7e4f3767c8b (patch) | |
tree | 480ca93f19626e451cb79b35f29ad86d28da0fbb /fs/nfs/pnfs.h | |
parent | NFS: Allow multiple commit requests in flight per file (diff) | |
download | linux-b20135d0b2431900a3a5395970ffb7e4f3767c8b.tar.xz linux-b20135d0b2431900a3a5395970ffb7e4f3767c8b.zip |
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.h | 6 |
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) { |