mbox series

[RFC,v3,0/2] nfsd: Initial implementation of NFSv4 Courteous Server

Message ID 20210916182212.81608-1-dai.ngo@oracle.com (mailing list archive)
Headers show
Series nfsd: Initial implementation of NFSv4 Courteous Server | expand

Message

Dai Ngo Sept. 16, 2021, 6:22 p.m. UTC
Hi Bruce,

This series of patches implement the NFSv4 Courteous Server.

A server which does not immediately expunge the state on lease expiration
is known as a Courteous Server.  A Courteous Server continues to recognize
previously generated state tokens as valid until conflict arises between
the expired state and the requests from another client, or the server
reboots.

The v2 patch includes the following:

. add new callback, lm_expire_lock, to lock_manager_operations to
  allow the lock manager to take appropriate action with conflict lock.

. handle conflicts of NFSv4 locks with NFSv3/NLM and local locks.

. expire courtesy client after 24hr if client has not reconnected.

. do not allow expired client to become courtesy client if there are
  waiters for client's locks.

. modify client_info_show to show courtesy client and seconds from
  last renew.

. fix a problem with NFSv4.1 server where the it keeps returning
  SEQ4_STATUS_CB_PATH_DOWN in the successful SEQUENCE reply, after
  the courtesy client re-connects, causing the client to keep sending
  BCTS requests to server.

The v3 patch includes the following:

. modify posix_test_lock to check and resolve conflict locks
  for handling of NLM TEST and NFSv4 LOCKT requests.

. separate out fix for back channel stuck in SEQ4_STATUS_CB_PATH_DOWN.

. merge with 5.15-rc1

Comments

J. Bruce Fields Sept. 23, 2021, 1:47 a.m. UTC | #1
I haven't tried to figure out why, but I notice after these patches that
pynfs tests RENEW3, LKU10, CLOSE9, and CLOSE8 are failing with
unexpected share denied errors.

--b.
Dai Ngo Sept. 23, 2021, 5:15 p.m. UTC | #2
On 9/22/21 6:47 PM, J. Bruce Fields wrote:
> I haven't tried to figure out why, but I notice after these patches that
> pynfs tests RENEW3

The failure is related to share reservation, will be fixed when we
have code that handles share reservation with courtesy client. However,
with courtesy client support, the test will need to be modified since
the expected result will be NFS4_OK instead of NFS4ERR_EXPIRE.

> , LKU10, CLOSE9, and CLOSE8 are failing with
> unexpected share denied errors.

I suspected these tests are also related to share reservation. However,
I had problems running these tests, they are skipped. For example:

[root@nfsvmf25 nfs4.0]# ./testserver.py $server  -v CLOSE9
**************************************************
**************************************************
Command line asked for 1 of 673 tests
Of those: 1 Skipped, 0 Failed, 0 Warned, 0 Passed
[root@nfsvmf25 nfs4.0]#

Do I need to do any special setup to run these tests?

Thanks,
-Dai

>
> --b.
Dai Ngo Sept. 23, 2021, 7:37 p.m. UTC | #3
On 9/23/21 10:15 AM, dai.ngo@oracle.com wrote:
>
> On 9/22/21 6:47 PM, J. Bruce Fields wrote:
>> I haven't tried to figure out why, but I notice after these patches that
>> pynfs tests RENEW3
>
> The failure is related to share reservation, will be fixed when we
> have code that handles share reservation with courtesy client. However,
> with courtesy client support, the test will need to be modified since
> the expected result will be NFS4_OK instead of NFS4ERR_EXPIRE.

correction, with the patch for handling share reservation conflict,
this test now passes with NFS4ERR_EXPIRE as expected since the courtesy
client was destroyed.

-Dai

>
>> , LKU10, CLOSE9, and CLOSE8 are failing with
>> unexpected share denied errors.
>
> I suspected these tests are also related to share reservation. However,
> I had problems running these tests, they are skipped. For example:
>
> [root@nfsvmf25 nfs4.0]# ./testserver.py $serverĀ  -v CLOSE9
> **************************************************
> **************************************************
> Command line asked for 1 of 673 tests
> Of those: 1 Skipped, 0 Failed, 0 Warned, 0 Passed
> [root@nfsvmf25 nfs4.0]#
>
> Do I need to do any special setup to run these tests?

still trying to figure out why these tests are skipped on my setup.

-Dai

>
> Thanks,
> -Dai
>
>>
>> --b.