Re: [PATCH v5 04/18] btrfs: add simple_quota incompat feature to sysfs

David Sterba
2023-09-07T17:06:48Z

On Thu, Jul 27, 2023 at 03:12:51PM -0700, Boris Burkov wrote:
> Add an entry in the features directory for the new incompat flag
>
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
> fs/btrfs/sysfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index e53614753391..f62bba0068ca 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -291,6 +291,7 @@ BTRFS_FEAT_ATTR_INCOMPAT(metadata_uuid, METADATA_UUID);
> BTRFS_FEAT_ATTR_COMPAT_RO(free_space_tree, FREE_SPACE_TREE);
> BTRFS_FEAT_ATTR_COMPAT_RO(block_group_tree, BLOCK_GROUP_TREE);
> BTRFS_FEAT_ATTR_INCOMPAT(raid1c34, RAID1C34);
> +BTRFS_FEAT_ATTR_INCOMPAT(simple_quota, SIMPLE_QUOTA);

I'm not sure if you mentioned in the cover letter or if we had discussed
it before, but does this need to be a full incompat bit? I.e. no mount
on older kernels, compared to a COMPAT_RO which would allow
read-only mount.

> #ifdef CONFIG_BLK_DEV_ZONED
> BTRFS_FEAT_ATTR_INCOMPAT(zoned, ZONED);
> #endif
> @@ -322,6 +323,7 @@ static struct attribute *btrfs_supported_feature_attrs[] = {
> BTRFS_FEAT_ATTR_PTR(free_space_tree),
> BTRFS_FEAT_ATTR_PTR(raid1c34),
> BTRFS_FEAT_ATTR_PTR(block_group_tree),
> + BTRFS_FEAT_ATTR_PTR(simple_quota),
> #ifdef CONFIG_BLK_DEV_ZONED
> BTRFS_FEAT_ATTR_PTR(zoned),
> #endif
> --
> 2.41.0