xfs: introduce all-mounts list for cpu hotplug notifications
authorDave Chinner <dchinner@redhat.com>
Fri, 6 Aug 2021 18:05:38 +0000 (11:05 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 6 Aug 2021 18:05:38 +0000 (11:05 -0700)
commit0ed17f01c85401abf1706d9825796fc6661c0889
tree7be682a813282924b77a75d9eeb9ad63d3b9d0d3
parentf1653c2e2831e9db6cd68473bbec581782df03a5
xfs: introduce all-mounts list for cpu hotplug notifications

The inode inactivation and CIL tracking percpu structures are
per-xfs_mount structures. That means when we get a CPU dead
notification, we need to then iterate all the per-cpu structure
instances to process them. Rather than keeping linked lists of
per-cpu structures in each subsystem, add a list of all xfs_mounts
that the generic xfs_cpu_dead() function will iterate and call into
each subsystem appropriately.

This allows us to handle both per-mount and global XFS percpu state
from xfs_cpu_dead(), and avoids the need to link subsystem
structures that can be easily found from the xfs_mount into their
own global lists.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
[djwong: expand some comments about mount list setup ordering rules]
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_mount.h
fs/xfs/xfs_super.c