Re: knfsd server returns writeverf of all 0 bits (but was not rebooted)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Dec 13, 2021, at 2:54 PM, Trond Myklebust <trondmy@xxxxxxxxxxxxxxx> wrote:
> 
> On Mon, 2021-12-13 at 19:42 +0000, Chuck Lever III wrote:
>> Hi Rick-
>> 
>>> On Dec 9, 2021, at 6:15 PM, Rick Macklem <rmacklem@xxxxxxxxxxx>
>>> wrote:
>>> 
>>> Hi,
>>> 
>>> When testing against the knfsd in a Linux 5.15.1 kernel, I received
>>> a
>>> write reply with FILE_SYNC and a writeverf of all 0 bytes.
>>> (Previous write verifiers were not all 0 bytes.)
>>> 
>>> The server seemed to be functioning normally and had not rebooted.
>>> 
>>> Is this intended behaviour?
>>> 
>>> Normally I would not expect the writeverf in a Write operation
>>> reply
>>> to change unless the server had rebooted, but I can see there might
>>> be circumstances where the knfsd server wants all non-FILE_SYNC
>>> writes to be redone by the client and would choose to change the
>>> writeverf.
>>> However, changing it to all 0 bytes seems particularly odd?
>> 
>> I don't immediately see a code path for WRITE or COMMIT that would
>> set the verifier to zeroes. When Linux NFSD resets its write
>> verifier,
>> it sets it to the current time.
>> 
>> Do you have a reproducer you can share?
>> 
> 
> Rick is using FILE_SYNC, whereas nfsd_vfs_write() only actually sets
> the boot verifier if the write is unstable or DATA_SYNC.

It wasn't clear from Rick's note that the verifier change he
observed was not permanent.

So then the answer to "Is this intended behavior?" is "Yes,
Linux NFSD returns an all-zero verifier for FILE_SYNC writes,
since the client does not use the verifier in this case. The
boot verifier for subsequent non-FILE_SYNC writes is not
altered."


--
Chuck Lever







[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux