From: David Sterba <dsterba@suse.cz>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH for 5.2] Btrfs: fix failure to persist compression property xattr deletion on fsync
Date: Mon, 17 Jun 2019 16:27:48 +0200 [thread overview]
Message-ID: <20190617142748.GF19057@twin.jikos.cz> (raw)
In-Reply-To: <20190612141411.25339-1-fdmanana@kernel.org>
On Wed, Jun 12, 2019 at 03:14:11PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> After the recent series of cleanups in the properties and xattrs modules
> that landed in the 5.2 merge window, we ended up with a regression where
> after deleting the compression xattr property through the setflags ioctl,
> we don't set the BTRFS_INODE_COPY_EVERYTHING flag in the inode anymore.
> As a consequence, if the inode was fsync'ed when it had the compression
> property set, after deleting the compression property through the setflags
> ioctl and fsync'ing again the inode, the log will still contain the
> compression xattr, because the inode did not had that bit set, which
> made the fsync not delete all xattrs from the log and copy all xattrs
> from the subvolume tree to the log tree.
>
> This regression happens due to the fact that that series of cleanups
> made btrfs_set_prop() call the old function do_setxattr() (which is now
> named btrfs_setxattr()), and not the old version of btrfs_setxattr(),
> which is now called btrfs_setxattr_trans().
>
> Fix this by setting the BTRFS_INODE_COPY_EVERYTHING bit in the current
> btrfs_setxattr() function and remove it from everywhere else, including
> its setup at btrfs_ioctl_setflags(). This is cleaner, avoids similar
> regressions in the future, and centralizes the setup of the bit. After
> all, the need to setup this bit should only be in the xattrs module,
> since it is an implementation of xattrs.
>
> Fixes: 04e6863b19c722 ("btrfs: split btrfs_setxattr calls regarding transaction")
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Queued for 5.2, thanks.
prev parent reply other threads:[~2019-06-17 14:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 14:14 [PATCH for 5.2] Btrfs: fix failure to persist compression property xattr deletion on fsync fdmanana
2019-06-17 14:27 ` David Sterba [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190617142748.GF19057@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox