diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-02-15 12:56:17 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-02-15 13:03:30 -0500 |
commit | e0fa0d0189f6be61343dbff1f71bef20125576e7 (patch) | |
tree | fa2fe7369d3d85f1189fdf21e4aaca790ed4b36c | |
parent | 2f21596882f4a0edc387051910d56f8732970080 (diff) |
pNFS: Always set NFS_LAYOUT_RETURN_REQUESTED with lo->plh_return_iomode
When setting the layout return mode, we must always also set the
NFS_LAYOUT_RETURN_REQUESTED flag to ensure that we send a layoutreturn.
Otherwise pnfs_error_mark_layout_for_return() could set the mode, but
fail to send the layoutreturn because another is already in flight.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r-- | fs/nfs/pnfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 8d9fa4e40e89..5064f23ca8cc 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -1738,6 +1738,7 @@ pnfs_set_plh_return_iomode(struct pnfs_layout_hdr *lo, enum pnfs_iomode iomode) | |||
1738 | if (lo->plh_return_iomode != 0) | 1738 | if (lo->plh_return_iomode != 0) |
1739 | iomode = IOMODE_ANY; | 1739 | iomode = IOMODE_ANY; |
1740 | lo->plh_return_iomode = iomode; | 1740 | lo->plh_return_iomode = iomode; |
1741 | set_bit(NFS_LAYOUT_RETURN_REQUESTED, &lo->plh_flags); | ||
1741 | } | 1742 | } |
1742 | 1743 | ||
1743 | /** | 1744 | /** |
@@ -1777,8 +1778,6 @@ pnfs_mark_matching_lsegs_return(struct pnfs_layout_hdr *lo, | |||
1777 | remaining++; | 1778 | remaining++; |
1778 | set_bit(NFS_LSEG_LAYOUTRETURN, &lseg->pls_flags); | 1779 | set_bit(NFS_LSEG_LAYOUTRETURN, &lseg->pls_flags); |
1779 | pnfs_set_plh_return_iomode(lo, return_range->iomode); | 1780 | pnfs_set_plh_return_iomode(lo, return_range->iomode); |
1780 | set_bit(NFS_LAYOUT_RETURN_REQUESTED, | ||
1781 | &lo->plh_flags); | ||
1782 | } | 1781 | } |
1783 | return remaining; | 1782 | return remaining; |
1784 | } | 1783 | } |