diff options
author | Qu Wenruo <wqu@suse.com> | 2021-01-26 16:34:02 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-02-08 22:59:03 +0100 |
commit | 0bb3eb3ee8674d5d20ad3c0c0767e18787bbd761 (patch) | |
tree | 4dd6aa12a0a58de4c8a8695cf1644bf4a3d9d230 /fs/btrfs/super.c | |
parent | 92082d40976ed0a421305e2264bde53944805627 (diff) |
btrfs: allow read-only mount of 4K sector size fs on 64K page system
This adds the basic RO mount ability for 4K sector size on 64K page
system.
Currently we only plan to support 4K and 64K page system.
Reviewed-by: Josef Bacik <josef@toxicpanda.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/super.c')
-rw-r--r-- | fs/btrfs/super.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 919ed5c357e9..f8435641b912 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2027,6 +2027,13 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) ret = -EINVAL; goto restore; } + if (fs_info->sectorsize < PAGE_SIZE) { + btrfs_warn(fs_info, + "read-write mount is not yet allowed for sectorsize %u page size %lu", + fs_info->sectorsize, PAGE_SIZE); + ret = -EINVAL; + goto restore; + } /* * NOTE: when remounting with a change that does writes, don't |