Skip to content

Show last holder PID, inode in client_locks#312

Open
aversecat wants to merge 1 commit into
mainfrom
auke/lock_info
Open

Show last holder PID, inode in client_locks#312
aversecat wants to merge 1 commit into
mainfrom
auke/lock_info

Conversation

@aversecat
Copy link
Copy Markdown
Contributor

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).

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>
@aversecat aversecat added WIP enhancement New feature or request labels May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant