dCache - a system for storing and retrieving huge amounts of data, distributed among a large number of heterogenous server nodes, under a single virtual filesystem tree with a variety of standard access methods
Motivation:
With CentOS7, the client sends the last request, such that offset+count == filesize. REHL9 sends the last request so that the count is multiple of 4096, which is legal.
If the count was bigger than internal buffer size, so that we needed to use multiple reads, the second read offset was miscalculated, as the expectation was that offset+count equals filesize.
Modification:
if offset is bigger then file size return success+empty buffer + EOF as stated in rfc5661#section-18.22.3
make sure, that number of bytes to read is the minimum from request count and files remaining bytes
allocated only required number of bytes (was provided count)
calculate next read file offset based on number of already read bytes
Result:
NFS mover used the correct value for next file offset and number of bytes.
Ticket: #10617, #10615
Acked-by: Paul Millar
Target: master, 10.0, 9.2
Require-book: no
Require-notes: yes
(cherry picked from commit 0597b1f47a47738a023b5fc81fe2fec684f80926)
Motivation: With CentOS7, the client sends the last request, such that offset+count == filesize. REHL9 sends the last request so that the count is multiple of 4096, which is legal.
CentOS7: Opcode: READ (25) StateID [StateID Hash: 0x96ef] StateID seqid: 1 StateID Other: 6651b9bd00040e8600000001 [StateID Other hash: 0x49a6ba9d] offset: 3785359360 count: 312015
RHEL9: Opcode: READ (25) stateid [StateID Hash: 0x065f] seqid: 0x00000001 Data: 66522f570001001100000001 offset: 3785359360 count: 315392
If the count was bigger than internal buffer size, so that we needed to use multiple reads, the second read offset was miscalculated, as the expectation was that offset+count equals filesize.
Modification:
Result: NFS mover used the correct value for next file offset and number of bytes.
Ticket: #10617, #10615 Acked-by: Paul Millar Target: master, 10.0, 9.2 Require-book: no Require-notes: yes (cherry picked from commit 0597b1f47a47738a023b5fc81fe2fec684f80926)