ROX-33218: Instrument inode tracking on directory being deleted#530
Open
JoukoVirtanen wants to merge 12 commits intomainfrom
Open
ROX-33218: Instrument inode tracking on directory being deleted#530JoukoVirtanen wants to merge 12 commits intomainfrom
JoukoVirtanen wants to merge 12 commits intomainfrom
Conversation
JoukoVirtanen
commented
Apr 19, 2026
| inode_key_t inode_key = inode_to_key(dentry->d_inode); | ||
| inode_key_t* inode_to_submit = &inode_key; | ||
|
|
||
| if (is_monitored(inode_key, path, NULL, &inode_to_submit) == NOT_MONITORED) { |
Contributor
Author
There was a problem hiding this comment.
This follows the same pattern as file unlinking, but I wonder if both could be simplified. I don't think we need to check is_monitored. I think it is probably better to just directly call inode_remove. If the inode is in the map then it needs to be removed. There could potentially be a bug where is_monitored return NOT_MONITORED, but the inode is in the map and needs to be removed. If the inode is in the map then removing it does no harm. inode_remove reports if the inode was in the map and that information can be used to increment the metric if needed.
…ere will only be metrics
4339c06 to
d35aa7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes inodes for directories from the maps in kernel and userspace when they are deleted
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
Ran tests locally. Tests were created first and they failed. Then they were made to pass. Initially the tests expected directory deletion events, but then it was made so that directory deletion events were no longer reported and then the tests failed. Finally the tests were modified so that they did not expect to see directory deletion events and they passed.