lkml.org 
[lkml]   [2022]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] btrfs: restore inode creation before xattr setting
On Fri, Apr 08, 2022 at 01:15:07PM -0400, Sweet Tea Dorminy wrote:
> According to the tree checker, "all xattrs with a given objectid follow
> the inode with that objectid in the tree" is an invariant. This was
> broken by the recent change "btrfs: move common inode creation code into
> btrfs_create_new_inode()", which moved acl creation and property
> inheritance (stored in xattrs) to before inode insertion into the tree.
> As a result, under certain timings, the xattrs could be written to the
> tree before the inode, causing the tree checker to report violation of
> the invariant.
>
> Move property inheritance and acl creation back to their old ordering
> after the inode insertion.
>
> Suggested-by: Omar Sandoval <osandov@osandov.com>
> Reported-by: Naohiro Aota <naohiro.aota@wdc.com>
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
> ---
> This should apply on top of osandov's patch at
> https://lore.kernel.org/linux-btrfs/da6cfa1b8e42db5c8954680cac1ca322d463b880.1647306546.git.osandov@fb.com/
>
> It's survived a good dose of fstests, and several iterations of specific
> tests that were failing, e.g. generic/650.

Thanks.

> David: I don't know if you'd rather roll this into osandov's original
> patch, or whether you'd like me or osandov to resend the patch linked
> above with this addition rolled into it, or whether you'd like to apply
> it separately.

For simple fixups sent as replies I can apply it manually but sometimes
it's better for me to do the review instead of trying to figure out what
was the real intention.

So patch applied cleanly and now pushed to misc-next, thanks.

\
 
 \ /
  Last update: 2022-04-08 20:42    [W:0.045 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site