remarkable-linux/include
David Howells ccc4fc3d11 FS-Cache: Implement the cookie management part of the netfs API
Implement the cookie management part of the FS-Cache netfs client API.  The
documentation and API header file were added in a previous patch.

This patch implements the following three functions:

 (1) fscache_acquire_cookie().

     Acquire a cookie to represent an object to the netfs.  If the object in
     question is a non-index object, then that object and its parent indices
     will be created on disk at this point if they don't already exist.  Index
     creation is deferred because an index may reside in multiple caches.

 (2) fscache_relinquish_cookie().

     Retire or release a cookie previously acquired.  At this point, the
     object on disk may be destroyed.

 (3) fscache_update_cookie().

     Update the in-cache representation of a cookie.  This is used to update
     the auxiliary data for coherency management purposes.

With this patch it is possible to have a netfs instruct a cache backend to
look up, validate and create metadata on disk and to destroy it again.
The ability to actually store and retrieve data in the objects so created is
added in later patches.

Note that these functions will never return an error.  _All_ errors are
handled internally to FS-Cache.

The worst that can happen is that fscache_acquire_cookie() may return a NULL
pointer - which is considered a negative cookie pointer and can be passed back
to any function that takes a cookie without harm.  A negative cookie pointer
merely suppresses caching at that level.

The stub in linux/fscache.h will detect inline the negative cookie pointer and
abort the operation as fast as possible.  This means that the compiler doesn't
have to set up for a call in that case.

See the documentation in Documentation/filesystems/caching/netfs-api.txt for
more information.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
2009-04-03 16:42:38 +01:00
..
acpi acpi/x86: introduce __apci_map_table, v4 2009-02-09 13:35:07 +01:00
asm-arm S3C24XX: Move and update IIS headers 2009-03-05 12:00:59 +00:00
asm-frv mm: use debug_kmap_atomic 2009-04-01 08:59:14 -07:00
asm-generic gpiolib: allow GPIOs to be named 2009-04-02 19:04:51 -07:00
asm-h8300
asm-m32r Allow rwlocks to re-enable interrupts 2009-04-02 19:05:11 -07:00
asm-mn10300 mm: use debug_kmap_atomic 2009-04-01 08:59:14 -07:00
crypto crypto: zlib - New zlib crypto module, using pcomp 2009-03-04 15:16:19 +08:00
drm drm: remove unused "can_grow" parameter from drm_crtc_helper_initial_config 2009-04-03 10:21:44 +10:00
keys
linux FS-Cache: Implement the cookie management part of the netfs API 2009-04-03 16:42:38 +01:00
math-emu
media V4L/DVB (11313): v4l2-subdev: add enum_framesizes and enum_frameintervals. 2009-03-30 12:43:49 -03:00
mtd make MTD headers use strict integer types 2009-03-26 18:14:17 +01:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-04-02 21:05:30 -07:00
pcmcia
rdma Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-03-26 15:54:36 -07:00
rxrpc
scsi [SCSI] iscsi class: remove host no argument from session creation callout 2009-03-13 15:29:39 -05:00
sound V4L/DVB (10771): tea575x-tuner: convert it to V4L2 API 2009-03-30 12:43:02 -03:00
trace net: Add dependent headers to trace/skb.h 2009-03-24 14:24:10 -07:00
video fbdev: update s1d13xxxfb to differ between revisions and production ids 2009-04-01 08:59:32 -07:00
xen
Kbuild