Skip to content

Fix in-memory metadata corruption at xfs_attr3_leaf_write_verify()

Alex Lyakas linux-xfs stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfs: add the ability to join a held buffer to a defer_opsfs/xfs/libxfs/xfs_defer.c fs/xfs/libxfs/xfs_defer.h+40 -40 replies
2/2xfs: hold xfs_buf locked between shortform->leaf conversion and the addition of an attributefs/xfs/libxfs/xfs_attr.c fs/xfs/libxfs/xfs_attr_leaf.c fs/xfs/libxfs/xfs_attr_leaf.h+23 -90 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBrian Foster
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [STABLE PATCH 0/2] Fix in-memory metadata corruption at xfs_attr3_leaf_write_verify()

This is a partial backport of original Darrick's series "xfs: logging fixes" to kernel 4.14. It fixes the in-memory metadata corruption error, which happens
when a partially initialized attribute buffer is attemped to be written to disk. This issue is reproducible with kernel 4.14, when adding a 1-sec sleep in xfs_attr_set(), between the call to xfs_attr_shortform_to_leaf() and the call to xfs_attr_leaf_addname().

Darrick J. Wong (2):
xfs: add the ability to join a held buffer to a defer_ops
xfs: hold xfs_buf locked between shortform->leaf conversion and the
addition of an attribute

 fs/xfs/libxfs/xfs_attr.c      | 20 +++++++++++++++-----
 fs/xfs/libxfs/xfs_attr_leaf.c |  9 ++++++---
 fs/xfs/libxfs/xfs_attr_leaf.h |  3 ++-
 fs/xfs/libxfs/xfs_defer.c     | 39 ++++++++++++++++++++++++++++++++++++---
 fs/xfs/libxfs/xfs_defer.h     |  5 ++++-
 5 files changed, 63 insertions(+), 13 deletions(-)
Signature · 1 line
1.9.1