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;