]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: make sure SB_I_VERSION doesn't get unset by remount
authorJosef Bacik <josef@toxicpanda.com>
Thu, 30 Jul 2020 15:18:09 +0000 (11:18 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 10 Aug 2020 16:58:35 +0000 (18:58 +0200)
commit91cbea198d6016e2805c5d56df40573f38be27cc
tree30291d3338c3bb21099a374f9f28fa6dd79adc70
parent422c781d59ecf1c8e927929a4a01f2825353c399
btrfs: make sure SB_I_VERSION doesn't get unset by remount

There's some inconsistency around SB_I_VERSION handling with mount and
remount.  Since we don't really want it to be off ever just work around
this by making sure we don't get the flag cleared on remount.

There's a tiny cpu cost of setting the bit, otherwise all changes to
i_version also change some of the times (ctime/mtime) so the inode needs
to be synced. We wouldn't save anything by disabling it.

Reported-by: Eric Sandeen <sandeen@redhat.com>
CC: stable@vger.kernel.org # 5.4+
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add perf impact analysis ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c