xfs: Add inode pin counts to traces
We don't record pin counts in inode events right now, and this makes it difficult to track down problems related to pinning inodes. Add the pin count to the inode trace class and add trace events for pinning and unpinning inodes. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
43f5efc5b5
commit
4aaf15d1aa
3 changed files with 12 additions and 1 deletions
|
@ -543,6 +543,7 @@ xfs_inode_item_pin(
|
|||
{
|
||||
ASSERT(xfs_isilocked(iip->ili_inode, XFS_ILOCK_EXCL));
|
||||
|
||||
trace_xfs_inode_pin(iip->ili_inode, _RET_IP_);
|
||||
atomic_inc(&iip->ili_inode->i_pincount);
|
||||
}
|
||||
|
||||
|
@ -561,6 +562,7 @@ xfs_inode_item_unpin(
|
|||
{
|
||||
struct xfs_inode *ip = iip->ili_inode;
|
||||
|
||||
trace_xfs_inode_unpin(ip, _RET_IP_);
|
||||
ASSERT(atomic_read(&ip->i_pincount) > 0);
|
||||
if (atomic_dec_and_test(&ip->i_pincount))
|
||||
wake_up(&ip->i_ipin_wait);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue