From 355efe3ec181844d50e35ce0c9799ed10a6689b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 24 Aug 2006 20:54:24 +0000 Subject: [PATCH] improve debug command vnode_cache: it now accepts a device arg git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18618 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/fs/vfs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index ebbfb4073a..6236faf104 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -2378,6 +2378,11 @@ dump_vnode_caches(int argc, char **argv) { struct hash_iterator iterator; struct vnode *vnode; + + // restrict dumped nodes to a certain device if requested + mount_id device = -1; + if (argc > 1) + device = atoi(argv[1]); kprintf("address dev inode cache size pages\n"); @@ -2385,6 +2390,8 @@ dump_vnode_caches(int argc, char **argv) while ((vnode = (struct vnode *)hash_next(sVnodeTable, &iterator)) != NULL) { if (vnode->cache == NULL) continue; + if (device != -1 && vnode->device != device) + continue; // count pages in cache size_t numPages = 0;