Fix in-memory metadata corruption at xfs_attr3_leaf_write_verify()
cover 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
Quoted 6 lines · Alex Lyakas
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 inxfs_attr_set(), between the call toxfs_attr_shortform_to_leaf()and the call toxfs_attr_leaf_addname().
For future reference, you probably want to make sure the patch series is threaded when it's posted to the list. That aside, this looks like a reasonable and straightforward backport to me:
Quoted 15 lines
Darrick J. Wong (2):
xfs: add the ability to join a held buffer to adefer_ops
xfs: holdxfs_buflocked betweenshortform->leafconversion and the
addition of an attributefs/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
Hi Brian,
Quoted 11 lines · Brian Foster
Quoted 6 lines · Alex Lyakas
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 inxfs_attr_set(), between the call toxfs_attr_shortform_to_leaf()and the call toxfs_attr_leaf_addname().For future reference, you probably want to make sure the patch series is threaded when it's posted to the list.
I am not sure what you mean by this. I used "git-send-email" to send all the patches one-by-one. Perhaps you mean that I should have sent them in one "git-send-email" command?
Quoted 4 lines
That aside, this looks like a
reasonable and straightforward backport to me:Acked-by Brian Foster <[email protected]>
I assume that I can treat your "Acked-by" as "Reviewed-by" (Dave asked for this to pass a review).
Thanks!
Alex.
Quoted 16 lines
Quoted 16 lines
Darrick J. Wong (2):
xfs: add the ability to join a held buffer to adefer_ops
xfs: holdxfs_buflocked betweenshortform->leafconversion and the
addition of an attributefs/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(-)--
1.9.1
Quoted 12 lines · Alex Lyakas
Hi Brian,
Quoted 9 lines · Brian Foster
Quoted 6 lines · Alex Lyakas
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 inxfs_attr_set(), between the call toxfs_attr_shortform_to_leaf()and the call toxfs_attr_leaf_addname().
Quoted 6 lines
Quoted 2 lines
For future reference, you probably want to make sure the patch series is threaded when it's posted to the list.
I am not sure what you mean by this. I used "git-send-email" to send all the patches one-by-one. Perhaps you mean that I should have sent them in one "git-send-email" command?
Yeah, most likely. At least I don't do anything more than format a patch series to a directory, update the cover letter and whatnot and then 'git send-email ...' on the entire directory to achieve threading.
Quoted 7 lines
Quoted 4 lines
That aside, this looks like a
reasonable and straightforward backport to me:Acked-by Brian Foster <[email protected]>I assume that I can treat your "Acked-by" as "Reviewed-by" (Dave asked for this to pass a review).
Sure, either way is fine. I wasn't sure what tags are expected for the stable trees (if any) and just wanted to indicate that I think the backport looks fine.
Brian
Quoted 20 lines
Thanks!
Alex.Quoted 16 lines
Quoted 16 lines
Darrick J. Wong (2):
xfs: add the ability to join a held buffer to adefer_ops
xfs: holdxfs_buflocked betweenshortform->leafconversion and the
addition of an attributefs/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(-)--
1.9.1
Quoted 10 lines · Alex Lyakas
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 inxfs_attr_set(), between the call toxfs_attr_shortform_to_leaf()and the call toxfs_attr_leaf_addname().Darrick J. Wong (2):
xfs: add the ability to join a held buffer to adefer_ops
xfs: holdxfs_buflocked betweenshortform->leafconversion and the
addition of an attribute
What are the git commit ids of these patches in Linus's tree?
thanks,
greg k-h
Hi Greg,
The relevant commits in the Linus's tree are:
b7b2846fe26f2c0d7f317c874a13d3ecf22670ff
xfs: add the ability to join a held buffer to a defer_ops
6e643cd094de3bd0f97edcc1db0089afa24d909f
xfs: hold xfs_buf locked between shortform->leaf conversion and the addition of an attribute
They were pulled by Linus in commit:
fca0e39b2bd2fcfea2027845df28757943d9f561
Merge tag 'xfs-4.15-fixes-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Thanks,
Alex.
Quoted 18 lines · Greg KH
Quoted 10 lines · Alex Lyakas
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 inxfs_attr_set(), between the call toxfs_attr_shortform_to_leaf()and the call toxfs_attr_leaf_addname().Darrick J. Wong (2):
xfs: add the ability to join a held buffer to adefer_ops
xfs: holdxfs_buflocked betweenshortform->leafconversion and the
addition of an attributeWhat are the git commit ids of these patches in Linus's tree?
thanks,
greg k-h
Quoted 7 lines · Alex Lyakas
Hi Greg,
The relevant commits in the Linus's tree are:
b7b2846fe26f2c0d7f317c874a13d3ecf22670ff
xfs: add the ability to join a held buffer to adefer_ops
Quoted 8 lines
6e643cd094de3bd0f97edcc1db0089afa24d909f
xfs: holdxfs_buflocked betweenshortform->leafconversion and the addition of an attributeThey were pulled by Linus in commit:
fca0e39b2bd2fcfea2027845df28757943d9f561
Merge tag 'xfs-4.15-fixes-8' ofgit://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Thanks, both now queued up.
greg k-h