xfs: add a lockdep class key for rtgroup inodes
authorDarrick J. Wong <djwong@kernel.org>
Mon, 4 Nov 2024 04:19:05 +0000 (20:19 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:35 +0000 (13:38 -0800)
commitc29237a65c8dbfade3c032763b66d495b8e8cb7a
treebc6f3fecdd5037aaffc6afaf0ac8f75ebcbc1a07
parent0e4875b3fb24c5bfdf685876c76713cda5a23b65
xfs: add a lockdep class key for rtgroup inodes

Add a dynamic lockdep class key for rtgroup inodes.  This will enable
lockdep to deduce inconsistencies in the rtgroup metadata ILOCK locking
order.  Each class can have 8 subclasses, and for now we will only have
2 inodes per group.  This enables rtgroup order and inode order checks
when nesting ILOCKs.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_rtgroup.c