Skip to content

afs: Fix directory size handling

David Howells linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3afs: Fix updating of i_size with dv jump from serverfs/afs/inode.c+1 -00 replies
2/3afs: Fix getattr to report server i_size on dirs, not local sizefs/afs/inode.c+8 -10 replies
3/3afs: Avoid endless loop if file is larger than expectedfs/afs/dir.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] afs: Fix directory size handling

Hi Linus,

Could you apply these three fixes to AFS directory handling?

(1) Make sure that afs_read_dir() sees any increase in file size if the file unexpectedly changed on the server (e.g. due to another client making a change).

(2) Make afs_getattr() always return the server's dir file size, not the locally edited one, so that pagecache eviction doesn't cause the dir file size to change unexpectedly.

(3) Prevent afs_read_dir() from getting into an endless loop if the server indicates that the directory file size is larger than expected.

The patches can be found here:

https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-fixes

Thanks,
David

---
%(shortlog)s
%(diffstat)s

David Howells (1):
afs: Fix getattr to report server i_size on dirs, not local size

Marc Dionne (2):
afs: Fix updating of i_size with dv jump from server
afs: Avoid endless loop if file is larger than expected

 fs/afs/dir.c   |  4 ++++
 fs/afs/inode.c | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)