Message ID | 20220425141300.16548-3-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show |
Series | [impish/linux-azure] ext4: add check to prevent attempting to resize an fs with sparse_super2 | expand |
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index bd0d185654f3..7a9f1adef679 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -74,6 +74,11 @@ int ext4_resize_begin(struct super_block *sb) return -EPERM; } + if (ext4_has_feature_sparse_super2(sb)) { + ext4_msg(sb, KERN_ERR, "Online resizing not supported with sparse_super2"); + return -EOPNOTSUPP; + } + if (test_and_set_bit_lock(EXT4_FLAGS_RESIZING, &EXT4_SB(sb)->s_ext4_flags)) ret = -EBUSY;