summaryrefslogtreecommitdiff
path: root/fs/btrfs/block-rsv.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-08-09 08:02:16 +0300
committerDavid Sterba <dsterba@suse.com>2022-09-26 13:28:00 +0300
commit81d5d61454c365718655cfc87d8200c84e25d596 (patch)
treeb51b6ed3540e1734d0260c504793251979be4a8d /fs/btrfs/block-rsv.c
parent8e327b9c0de858f27e711f854e8bf99e5d409c2e (diff)
downloadlinux-81d5d61454c365718655cfc87d8200c84e25d596.tar.xz
btrfs: enhance unsupported compat RO flags handling
Currently there are two corner cases not handling compat RO flags correctly: - Remount We can still mount the fs RO with compat RO flags, then remount it RW. We should not allow any write into a fs with unsupported RO flags. - Still try to search block group items In fact, behavior/on-disk format change to extent tree should not need a full incompat flag. And since we can ensure fs with unsupported RO flags never got any writes (with above case fixed), then we can even skip block group items search at mount time. This patch will enhance the unsupported RO compat flags by: - Reject read-write remount if there are unsupported RO compat flags - Go dummy block group items directly for unsupported RO compat flags In fact, only changes to chunk/subvolume/root/csum trees should go incompat flags. The latter part should allow future change to extent tree to be compat RO flags. Thus this patch also needs to be backported to all stable trees. CC: stable@vger.kernel.org # 4.9+ Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/block-rsv.c')
0 files changed, 0 insertions, 0 deletions