diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2017-12-08 20:52:57 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2018-01-15 07:06:29 +0300 |
commit | d78471d32bb60837930026e11828af596fb4bdac (patch) | |
tree | 2737a51fd9e2cfc23afac82f9aba8361d8ed90c5 /fs/nfs/pnfs.h | |
parent | ad6b0241c94e2732f928ec9ef5b3561d7448c8fe (diff) | |
download | linux-d78471d32bb60837930026e11828af596fb4bdac.tar.xz |
pnfs/blocklayout: set PNFS_LAYOUTRETURN_ON_ERROR
If there's an error doing I/O to block device, and the client resends the
I/O to the MDS, the MDS must recall the layout from the client before
processing the I/O. Let's preempt that exchange by returning the layout
before falling back to the MDS when there's an error.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 8d507c361d98..29a19814e538 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h @@ -524,8 +524,10 @@ static inline int pnfs_return_layout(struct inode *ino) struct nfs_inode *nfsi = NFS_I(ino); struct nfs_server *nfss = NFS_SERVER(ino); - if (pnfs_enabled_sb(nfss) && nfsi->layout) + if (pnfs_enabled_sb(nfss) && nfsi->layout) { + set_bit(NFS_LAYOUT_RETURN_REQUESTED, &nfsi->layout->plh_flags); return _pnfs_return_layout(ino); + } return 0; } |