]> git.karo-electronics.de Git - karo-tx-linux.git/commit
FS-Cache: Fix handling of an attempt to store a page that is now beyond EOF
authorDavid Howells <dhowells@redhat.com>
Thu, 3 Oct 2013 17:54:23 +0000 (18:54 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 11 Nov 2013 17:04:51 +0000 (17:04 +0000)
commit7c604e5d6e565f34d0156608be6e63fed5fad5c9
tree603105cfe19159bcb9fc8d9856b1655c953d753e
parentedae583a6d4d1ad2eb73981787790993fef1bbad
FS-Cache: Fix handling of an attempt to store a page that is now beyond EOF

Fix the handling of an attempt to store a page that is now beyond EOF.  This
may happen, for example, if the page got pushed for storage before the netfs
file got truncated on the server.  In such a case, we should just remove the
excessive pages from the cookie->stores radix tree and wake up the waiter.

This can be seen in /proc/fs/fscache/stats on this line:

Stores : ops=350 run=1895 pgs=1545 rxd=1727 olm=9

where olm=N has N > 0.

Reported-by: Milosz Tanski <milosz@adfin.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Milosz Tanski <milosz@adfin.com>
fs/fscache/page.c