summaryrefslogtreecommitdiffstats
path: root/.gitattributes
diff options
context:
space:
mode:
authorDavid Howells2017-03-16 17:27:44 +0100
committerDavid Howells2017-03-16 17:27:44 +0100
commit6db3ac3c4bc552837d232ec794559a2fae2815a0 (patch)
tree3d6a01c735e66fd6e597eba738321b91c2160ef1 /.gitattributes
parentafs: Deal with an empty callback array (diff)
downloadkernel-qcow2-linux-6db3ac3c4bc552837d232ec794559a2fae2815a0.tar.gz
kernel-qcow2-linux-6db3ac3c4bc552837d232ec794559a2fae2815a0.tar.xz
kernel-qcow2-linux-6db3ac3c4bc552837d232ec794559a2fae2815a0.zip
afs: Handle better the server returning excess or short data
When an AFS server is given an FS.FetchData{,64} request to read data from a file, it is permitted by the protocol to return more or less than was requested. kafs currently relies on the latter behaviour in readpage{,s} to handle a partial page at the end of the file (we just ask for a whole page and clear space beyond the short read). However, we don't handle all cases. Add: (1) Handle excess data by discarding it rather than aborting. Note that we use a common static buffer to discard into so that the decryption algorithm advances the PCBC state. (2) Handle a short read that affects more than just the last page. Note that if a read comes up unexpectedly short of long, it's possible that the server's copy of the file changed - in which case the data version number will have been incremented and the callback will have been broken - in which case all the pages currently attached to the inode will be zapped anyway at some point. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions