[GIT PULL 2/8] xfs: fix cpu hotplug mess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi Chandan,

Please pull this branch with changes.

As usual, I did a test-merge with the main upstream branch as of a few
minutes ago, and didn't see any conflicts.  Please let me know if you
encounter any problems.


The following changes since commit cfa2df68b7ceb49ac9eb2d295ab0c5974dbf17e7:

xfs: fix an agbno overflow in __xfs_getfsmap_datadev (2023-09-11 08:39:02 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/fix-percpu-lists-6.6_2023-09-12

for you to fetch changes up to ef7d9593390a050c50eba5fc02d2cb65a1104434:

xfs: remove CPU hotplug infrastructure (2023-09-11 08:39:04 -0700)

xfs: fix cpu hotplug mess [v2]

Ritesh and Eric separately reported crashes in XFS's hook function for
CPU hot remove if the remove event races with a filesystem being
mounted.  I also noticed via generic/650 that once in a while the log
will shut down over an apparent overrun of a transaction reservation;
this turned out to be due to CIL percpu list aggregation failing to pick
up the percpu list items from a dying CPU.

Either way, the solution here is to eliminate the need for a CPU dying
hook by using a private cpumask to track which CPUs have added to their
percpu lists directly, and iterating with that mask.  This fixes the log
problems and (I think) solves a theoretical UAF bug in the inodegc code

v2: fix a few put_cpu uses, add necessary memory barriers, and use
atomic cpumask operations

This has been lightly tested with fstests.  Enjoy!

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>

Darrick J. Wong (4):
xfs: fix per-cpu CIL structure aggregation racing with dying cpus
xfs: use per-mount cpumask to track nonempty percpu inodegc lists
xfs: remove the all-mounts list
xfs: remove CPU hotplug infrastructure

fs/xfs/xfs_icache.c        | 78 +++++++++++++++--------------------------
fs/xfs/xfs_icache.h        |  1 -
fs/xfs/xfs_log_cil.c       | 52 +++++++++-------------------
fs/xfs/xfs_log_priv.h      | 14 ++++----
fs/xfs/xfs_mount.h         |  7 ++--
fs/xfs/xfs_super.c         | 86 ++--------------------------------------------
include/linux/cpuhotplug.h |  1 -
7 files changed, 56 insertions(+), 183 deletions(-)

[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]

  Powered by Linux