20 Nov, 2009

1 commit

  • Allow the current state of all fscache objects to be dumped by doing:

    cat /proc/fs/fscache/objects

    By default, all objects and all fields will be shown. This can be restricted
    by adding a suitable key to one of the caller's keyrings (such as the session
    keyring):

    keyctl add user fscache:objlist "" @s

    The are:

    K Show hexdump of object key (don't show if not given)
    A Show hexdump of object aux data (don't show if not given)

    And paired restrictions:

    C Show objects that have a cookie
    c Show objects that don't have a cookie
    B Show objects that are busy
    b Show objects that aren't busy
    W Show objects that have pending writes
    w Show objects that don't have pending writes
    R Show objects that have outstanding reads
    r Show objects that don't have outstanding reads
    S Show objects that have slow work queued
    s Show objects that don't have slow work queued

    If neither side of a restriction pair is given, then both are implied. For
    example:

    keyctl add user fscache:objlist KB @s

    shows objects that are busy, and lists their object keys, but does not dump
    their auxiliary data. It also implies "CcWwRrSs", but as 'B' is given, 'b' is
    not implied.

    Signed-off-by: David Howells

    David Howells
     

03 Apr, 2009

1 commit

  • Make FS-Cache create its /proc interface and present various statistical
    information through it. Also provide the functions for updating this
    information.

    These features are enabled by:

    CONFIG_FSCACHE_PROC
    CONFIG_FSCACHE_STATS
    CONFIG_FSCACHE_HISTOGRAM

    The /proc directory for FS-Cache is also exported so that caching modules can
    add their own statistics there too.

    The FS-Cache module is loadable at this point, and the statistics files can be
    examined by userspace:

    cat /proc/fs/fscache/stats
    cat /proc/fs/fscache/histogram

    Signed-off-by: David Howells
    Acked-by: Steve Dickson
    Acked-by: Trond Myklebust
    Acked-by: Al Viro
    Tested-by: Daire Byrne

    David Howells