Skip to content
  • David Howells's avatar
    FS-Cache: Root index definition · a6891645
    David Howells authored
    
    
    Add a description of the root index of the cache for later patches to make use
    of.
    
    The root index is owned by FS-Cache itself.  When a netfs requests caching
    facilities, FS-Cache will, if one doesn't already exist, create an entry in
    the root index with the key being the name of the netfs ("AFS" for example),
    and the auxiliary data holding the index structure version supplied by the
    netfs:
    
    				     FSDEF
    				       |
    				 +-----------+
    				 |           |
    				NFS         AFS
    			       [v=1]       [v=1]
    
    If an entry with the appropriate name does already exist, the version is
    compared.  If the version is different, the entire subtree from that entry
    will be discarded and a new entry created.
    
    The new entry will be an index, and a cookie referring to it will be passed to
    the netfs.  This is then the root handle by which the netfs accesses the
    cache.  It can create whatever objects it likes in that index, including
    further indices.
    
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    Acked-by: default avatarSteve Dickson <steved@redhat.com>
    Acked-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Tested-by: default avatarDaire Byrne <Daire.Byrne@framestore.com>
    a6891645