Linux: Don't read pages beyond the cache eof
authorSimon Wilkinson <sxw@your-file-system.com>
Mon, 25 Apr 2011 18:18:39 +0000 (14:18 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 3 May 2011 02:20:03 +0000 (19:20 -0700)
commit2571b6285d5da8ef62ab38c3a938258ddd7bac4e
tree0421c7cef8e55b6cdece9cbbe451ddb0f306e0da
parentf451b4a98d79b84a37a059282d7855636981f265
Linux: Don't read pages beyond the cache eof

If we attempt to read past the end of the current cache file (for
example, when we're extending the file with ftruncate), don't force
the backend filesystem to populate that page with non-existent data.

This will hopefully fix a bus error when using tmpfs as a backing
cache.

FIXES 128452

Reviewed-on: http://gerrit.openafs.org/4562
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 79d5b5cce65b10134004c4cb2b7b34ac509cba6a)

Change-Id: Id9956be824a4c4d8db7deb65403f4d9740758e42
Reviewed-on: http://gerrit.openafs.org/4600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c