]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Add glockfd debugfs file
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 8 Jun 2022 14:22:55 +0000 (16:22 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 29 Jun 2022 11:07:16 +0000 (13:07 +0200)
commit5b41058ca8e8fa82f39ad31e6a7762c5610ef7bb
treeaca11ce2bab69d33f063fc50fc3664f3a8da4634
parent95bff9fd66ecd812d590c69387965cb20664fd49
gfs2: Add glockfd debugfs file

When a process has a gfs2 file open, the file is keeping a reference on the
underlying gfs2 inode, and the inode is keeping the inode's iopen glock held in
shared mode.  In other words, the process depends on the iopen glock of each
open gfs2 file.  Expose those dependencies in a new "glockfd" debugfs file.

The new debugfs file contains one line for each gfs2 file descriptor,
specifying the tgid, file descriptor number, and glock name, e.g.,

  1601 6 5/816d

This list is compiled by iterating all tasks on the system using find_ge_pid(),
and all file descriptors of each task using task_lookup_next_fd_rcu().  To make
that work from gfs2, export those two functions.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/file.c
fs/gfs2/glock.c
kernel/pid.c