linux/fs/afs
David Howells 6db3ac3c4b 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>
2017-03-16 16:27:44 +00:00
..
afs_cm.h afs: support the CB.ProbeUuid RPC op 2008-04-29 08:06:26 -07:00
afs_fs.h AFS: implement file locking 2007-07-16 09:05:43 -07:00
afs_vl.h AFS: Fix silly characters in a comment 2011-07-20 20:48:03 -04:00
afs.h afs: Support interacting with multiple user namespaces 2013-02-13 06:00:51 -08:00
cache.c Fix common misspellings 2011-03-31 11:26:23 -03:00
callback.c afs: Kill afs_wait_mode 2017-01-09 11:10:02 +00:00
cell.c FS-Cache: Provide the ability to enable/disable cookies 2013-09-27 18:40:25 +01:00
cmservice.c afs: Deal with an empty callback array 2017-03-16 16:27:44 +00:00
dir.c lib/vsprintf.c: remove %Z support 2017-02-27 18:43:47 -08:00
file.c afs: Handle better the server returning excess or short data 2017-03-16 16:27:44 +00:00
flock.c fs/afs/flock: Remove deprecated create_singlethread_workqueue 2016-09-04 21:41:39 +01:00
fsclient.c afs: Handle better the server returning excess or short data 2017-03-16 16:27:44 +00:00
inode.c afs: Populate group ID from vnode status 2017-03-16 16:27:43 +00:00
internal.h afs: Deal with an empty callback array 2017-03-16 16:27:44 +00:00
Kconfig fs/afs: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:39:04 -08:00
main.c afs: Use core kernel UUID generation 2017-02-10 16:34:17 +00:00
Makefile FS-Cache: Make kAFS use FS-Cache 2009-04-03 16:42:41 +01:00
misc.c kafs: Add more "unified AFS" error codes 2015-04-01 21:36:15 +01:00
mntpt.c fs: Better permission checking for submounts 2017-02-02 04:36:12 +13:00
netdevices.c afs: Use core kernel UUID generation 2017-02-10 16:34:17 +00:00
proc.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
rxrpc.c Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-03-03 10:16:38 -08:00
security.c afs: Adjust mode bits processing 2017-03-16 16:27:44 +00:00
server.c rxrpc: Provide a way for AFS to ask for the peer address of a call 2016-08-30 16:07:53 +01:00
super.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
vlclient.c afs: Kill afs_wait_mode 2017-01-09 11:10:02 +00:00
vlocation.c afs: Kill afs_wait_mode 2017-01-09 11:10:02 +00:00
vnode.c afs: Kill afs_wait_mode 2017-01-09 11:10:02 +00:00
volume.c afs: Make afs_readpages() fetch data in bulk 2017-01-06 16:54:41 +00:00
write.c afs: Fix page overput in afs_fill_page() 2017-03-16 16:27:43 +00:00