]> git.baikalelectronics.ru Git - kernel.git/commit
FS-Cache: Provide proper invalidation
authorDavid Howells <dhowells@redhat.com>
Thu, 20 Dec 2012 21:52:36 +0000 (21:52 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 20 Dec 2012 22:04:07 +0000 (22:04 +0000)
commitd3a073c9bf0d84eb8b630bcd7183eb530effcce8
tree4893f19487cb99e8ec0eb835ec4391d952641a9c
parent33d2e7e79eced2a5fa288a2676d8a47f56b41821
FS-Cache: Provide proper invalidation

Provide a proper invalidation method rather than relying on the netfs retiring
the cookie it has and getting a new one.  The problem with this is that isn't
easy for the netfs to make sure that it has completed/cancelled all its
outstanding storage and retrieval operations on the cookie it is retiring.

Instead, have the cache provide an invalidation method that will cancel or wait
for all currently outstanding operations before invalidating the cache, and
will cause new operations to queue up behind that.  Whilst invalidation is in
progress, some requests will be rejected until the cache can stack a barrier on
the operation queue to cause new operations to be deferred behind it.

Signed-off-by: David Howells <dhowells@redhat.com>
Documentation/filesystems/caching/backend-api.txt
Documentation/filesystems/caching/netfs-api.txt
Documentation/filesystems/caching/object.txt
fs/fscache/cookie.c
fs/fscache/internal.h
fs/fscache/object.c
fs/fscache/operation.c
fs/fscache/page.c
fs/fscache/stats.c
include/linux/fscache-cache.h
include/linux/fscache.h