-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some VFS helpers #90
Conversation
brenns10
commented
Jun 21, 2024
- A corelens module "ls" for listing dentry children.
- A corelens module "fsnotify" for printing fsnotify info about every fanotify, inotify, and dnotify group.
- Some minor improvements to bt() in order to improve the fsnotify helper.
Sample inotify and dnotify output from my laptop:
Sample fanotify output:
With higher levels of verbosity, at level 3, all of the ~80 tasks which were waiting for a permission response would have gotten printed with a stack trace. At level 4, all 131k inode marks would hav ebeen printed (by default, we only print the first 10 inodes, but we print all super blocks and vfsmounts). Of course, for the "ls" module it's a bit less interesting.
The ls module can be quite slow at times due to the implementation of path_lookup() which iterates over child lists rather than using the hash table. I'll try to upstream a helper that can use the hash table as well. |
This simple module just lists the children of a dentry, much like ls would list the contents of a directory. Of course, not all children of a dentry are real files (as they may be negative), and not all real contents of a directory are necessarily cached as a child dentry. So it's not an exact comparison. But it's close enough. Signed-off-by: Stephen Brennan <[email protected]>
This allows the bt() function to be used within other helpers without breaking up the indentation of the output. Signed-off-by: Stephen Brennan <[email protected]>
This just makes sense, idle tasks aren't terribly interesting. That said, make this a kwarg just so users can still look at them if they want. Signed-off-by: Stephen Brennan <[email protected]>
This module aids in understanding the state of the fsnotify subsystem: what inodes / superblocks / vfsmounts are being watched, who is waiting for events, and in the case of fanotify, who is waiting on an access response from userspace. Signed-off-by: Stephen Brennan <[email protected]>
Signed-off-by: Stephen Brennan <[email protected]>
Hopefully we will never need this, but it allows the UEK4 live and vmcore tests to pass. Signed-off-by: Stephen Brennan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, other looks good.
Also include the native_safe_halt() when a swapper task is halted. Signed-off-by: Stephen Brennan <[email protected]>
Gitlab vmcore & VM tests pass! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.