]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "nfsd4: a client's own opens needn't prevent delegations"
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 8 Mar 2021 15:52:29 +0000 (10:52 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 9 Mar 2021 15:37:34 +0000 (10:37 -0500)
commit56ef59fc7509c913de3bf8685dfe884b59c57811
tree7421c1e9694bcb3d7f2c40ce1dd3b87015d2e2b5
parent5060752d23b38b136576bd76cf9c683ce783d8da
Revert "nfsd4: a client's own opens needn't prevent delegations"

This reverts commit a5cfd7044c7e09b5415ae8cb456e53087d795e54.

That commit claimed to allow a client to get a read delegation when it
was the only writer.  Actually it allowed a client to get a read
delegation when *any* client has a write open!

The main problem is that it's depending on nfs4_clnt_odstate structures
that are actually only maintained for pnfs exports.

This causes clients to miss writes performed by other clients, even when
there have been intervening closes and opens, violating close-to-open
cache consistency.

We can do this a different way, but first we should just revert this.

I've added pynfs 4.1 test DELEG19 to test for this, as I should have
done originally!

Cc: stable@vger.kernel.org
Reported-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/locks.c
fs/nfsd/nfs4state.c