aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-11-19 13:11:04 -0500
committerDavid Howells <dhowells@redhat.com>2009-11-19 13:11:04 -0500
commit4fbf4291aa15926cd4fdca0ffe9122e89d0459db (patch)
treeec2195c39ef8117acea598af4a5c20c77f67aa0b /Documentation
parent440f0affe247e9990c8f8778f1861da4fd7d5e50 (diff)
FS-Cache: Allow the current state of all objects to be dumped
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 "<restrictions>" @s The <restrictions> 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 <dhowells@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/caching/fscache.txt81
1 files changed, 81 insertions, 0 deletions
diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt
index 9e94b9491d89..cac09e11ca30 100644
--- a/Documentation/filesystems/caching/fscache.txt
+++ b/Documentation/filesystems/caching/fscache.txt
@@ -299,6 +299,87 @@ proc files.
299 jiffy range covered, and the SECS field the equivalent number of seconds. 299 jiffy range covered, and the SECS field the equivalent number of seconds.
300 300
301 301
302===========
303OBJECT LIST
304===========
305
306If CONFIG_FSCACHE_OBJECT_LIST is enabled, the FS-Cache facility will maintain a
307list of all the objects currently allocated and allow them to be viewed
308through:
309
310 /proc/fs/fscache/objects
311
312This will look something like:
313
314 [root@andromeda ~]# head /proc/fs/fscache/objects
315 OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA
316 ======== ======== ==== ===== === === === == ===== == == = = | ================ == == ================ ================
317 17e4b 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88001dd82820 010006017edcf8bbc93b43298fdfbe71e50b57b13a172c0117f38472, e567634700000000000000000000000063f2404a000000000000000000000000c9030000000000000000000063f2404a
318 1693a 2 ACTV 0 0 0 0 0 0 7b 4 0 8 | NFS.fh DT 0 ffff88002db23380 010006017edcf8bbc93b43298fdfbe71e50b57b1e0162c01a2df0ea6, 420ebc4a000000000000000000000000420ebc4a0000000000000000000000000e1801000000000000000000420ebc4a
319
320where the first set of columns before the '|' describe the object:
321
322 COLUMN DESCRIPTION
323 ======= ===============================================================
324 OBJECT Object debugging ID (appears as OBJ%x in some debug messages)
325 PARENT Debugging ID of parent object
326 STAT Object state
327 CHLDN Number of child objects of this object
328 OPS Number of outstanding operations on this object
329 OOP Number of outstanding child object management operations
330 IPR
331 EX Number of outstanding exclusive operations
332 READS Number of outstanding read operations
333 EM Object's event mask
334 EV Events raised on this object
335 F Object flags
336 S Object slow-work work item flags
337
338and the second set of columns describe the object's cookie, if present:
339
340 COLUMN DESCRIPTION
341 =============== =======================================================
342 NETFS_COOKIE_DEF Name of netfs cookie definition
343 TY Cookie type (IX - index, DT - data, hex - special)
344 FL Cookie flags
345 NETFS_DATA Netfs private data stored in the cookie
346 OBJECT_KEY Object key } 1 column, with separating comma
347 AUX_DATA Object aux data } presence may be configured
348
349The data shown may be filtered by attaching the a key to an appropriate keyring
350before viewing the file. Something like:
351
352 keyctl add user fscache:objlist <restrictions> @s
353
354where <restrictions> are a selection of the following letters:
355
356 K Show hexdump of object key (don't show if not given)
357 A Show hexdump of object aux data (don't show if not given)
358
359and the following paired letters:
360
361 C Show objects that have a cookie
362 c Show objects that don't have a cookie
363 B Show objects that are busy
364 b Show objects that aren't busy
365 W Show objects that have pending writes
366 w Show objects that don't have pending writes
367 R Show objects that have outstanding reads
368 r Show objects that don't have outstanding reads
369 S Show objects that have slow work queued
370 s Show objects that don't have slow work queued
371
372If neither side of a letter pair is given, then both are implied. For example:
373
374 keyctl add user fscache:objlist KB @s
375
376shows objects that are busy, and lists their object keys, but does not dump
377their auxiliary data. It also implies "CcWwRrSs", but as 'B' is given, 'b' is
378not implied.
379
380By default all objects and all fields will be shown.
381
382
302========= 383=========
303DEBUGGING 384DEBUGGING
304========= 385=========