Show last holder PID, inode in client_locks#312
Open
aversecat wants to merge 1 commit into
Open
Conversation
Add last_user_pid[mode] and last_user_ino[mode] arrays to scoutfs_lock, filled in at the granted-mode path alongside the existing counts. The inode is passed by callers for all per-inode cases, and set to 0 for others. PID is from the current task. The client_locks line is expanded with "ino: rd I wr I wo I pid: rd P wr P wo P". Existing users:/waiters: field positions are unchanged. A simple test case demonstrates the functionality for the two simple inode/non-inode case, and for a contended lock case (multiple rd/wr lock holders). Signed-off-by: Auke Kok <auke.kok@versity.com>
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.
Add last_user_pid[mode] and last_user_ino[mode] arrays to scoutfs_lock, filled in at the granted-mode path alongside the existing counts. The inode is passed by callers for all per-inode cases, and set to 0 for others. PID is from the current task.
The client_locks line is expanded with "ino: rd I wr I wo I pid: rd P wr P wo P". Existing users:/waiters: field positions are unchanged.
A simple test case demonstrates the functionality for the two simple inode/non-inode case, and for a contended lock case (multiple rd/wr lock holders).