On Sat, Jan 22, 2022 at 05:37:16PM +0000, Chuck Lever III wrote: > Similar language in RFC 8881 section 18.22.4: > > >> If the server returns a "short read" (i.e., fewer data than requested > >> and eof is set to FALSE), the client should send another READ to get > >> the remaining data. A server may return less data than requested > >> under several circumstances. The file may have been truncated by > >> another client or perhaps on the server itself, changing the file > >> size from what the requesting client believes to be the case. This > >> would reduce the actual amount of data available to the client. It > >> is possible that the server reduce the transfer size and so return a > >> short read result. Server resource exhaustion may also occur in a > >> short read. > > So the server could be returning INVAL and leaving EOF set > to false. That might be triggering the client to retry the > READ. Does the server need to set the EOF flag if the READ > arguments cross the limit of the range that the server can > return? Does the client need to check for this case and > stop retrying? The specs aren't particularly clear on this > matter. But eof only in `resok` and not in `resfail`. For reference, here's the reply I got: Network File System, READ Reply Error: NFS3ERR_INVAL [Program Version: 3] [V3 Procedure: READ (6)] Status: NFS3ERR_INVAL (22) file_attributes Regular File mode: 0600 uid: 0 gid: 0 attributes_follow: value follows (1) attributes Regular File mode: 0600 uid: 0 gid: 0 Type: Regular File (1) Mode: 0600, S_IRUSR, S_IWUSR nlink: 1 uid: 0 gid: 0 size: 9223372036854775807 used: 4096 rdev: 0,0 fsid: 0x0000000000000002 (2) fileid: 69 atime: Jan 18, 2022 20:20:33.611267439 IST seconds: 1642530033 nano seconds: 611267439 mtime: Jan 18, 2022 20:20:33.571266608 IST seconds: 1642530033 nano seconds: 571266608 ctime: Jan 18, 2022 20:20:33.571266608 IST seconds: 1642530033 nano seconds: 571266608 -- Dan Aloni