Commit 9ed666e
committed
NFSD: Async COPY result needs to return a write verifier
Currently, when NFSD handles an asynchronous COPY, it returns a
zero write verifier, relying on the subsequent CB_OFFLOAD callback
to pass the write verifier and a stable_how4 value to the client.
However, if the CB_OFFLOAD never arrives at the client (for example,
if a network partition occurs just as the server sends the
CB_OFFLOAD operation), the client will never receive this verifier.
Thus, if the client sends a follow-up COMMIT, there is no way for
the client to assess the COMMIT result.
The usual recovery for a missing CB_OFFLOAD is for the client to
send an OFFLOAD_STATUS operation, but that operation does not carry
a write verifier in its result. Neither does it carry a stable_how4
value, so the client /must/ send a COMMIT in this case -- which will
always fail because currently there's still no write verifier in the
COPY result.
Thus the server needs to return a normal write verifier in its COPY
result even if the COPY operation is to be performed asynchronously.
If the server recognizes the callback stateid in subsequent
OFFLOAD_STATUS operations, then obviously it has not restarted, and
the write verifier the client received in the COPY result is still
valid and can be used to assess a COMMIT of the copied data, if one
is needed.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent 15392c8 commit 9ed666e
1 file changed
Lines changed: 8 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | 755 | | |
765 | 756 | | |
766 | 757 | | |
| |||
1632 | 1623 | | |
1633 | 1624 | | |
1634 | 1625 | | |
1635 | | - | |
1636 | 1626 | | |
1637 | 1627 | | |
1638 | 1628 | | |
| |||
1805 | 1795 | | |
1806 | 1796 | | |
1807 | 1797 | | |
| 1798 | + | |
| 1799 | + | |
1808 | 1800 | | |
| 1801 | + | |
1809 | 1802 | | |
1810 | | - | |
1811 | 1803 | | |
1812 | 1804 | | |
1813 | 1805 | | |
| |||
1816 | 1808 | | |
1817 | 1809 | | |
1818 | 1810 | | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
1819 | 1814 | | |
1820 | 1815 | | |
1821 | 1816 | | |
| |||
1840 | 1835 | | |
1841 | 1836 | | |
1842 | 1837 | | |
1843 | | - | |
1844 | | - | |
1845 | 1838 | | |
1846 | 1839 | | |
1847 | 1840 | | |
| |||
1853 | 1846 | | |
1854 | 1847 | | |
1855 | 1848 | | |
1856 | | - | |
1857 | | - | |
| 1849 | + | |
| 1850 | + | |
1858 | 1851 | | |
1859 | 1852 | | |
1860 | 1853 | | |
| |||
0 commit comments