Re: [PATCH v2 16/20] btrfs: Add new FEATURE_INCOMPAT_FSCRYPT feature flag.

Eric Biggers
2022-09-12T01:37:06Z

On Mon, Sep 05, 2022 at 08:35:31PM -0400, Sweet Tea Dorminy wrote:
> From: Omar Sandoval <osandov@osandov.com>
>
> As fscrypt files will be incompatible with older filesystem versions,
> new filesystems should be created with an incompat flag for fscrypt.
>
> Signed-off-by: Omar Sandoval <osandov@osandov.com>
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
> ---
> fs/btrfs/ctree.h | 6 ++++--
> include/uapi/linux/btrfs.h | 1 +
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 38927a867028..e8d000fcc85d 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -330,7 +330,8 @@ static_assert(sizeof(struct btrfs_super_block) == BTRFS_SUPER_INFO_SIZE);
> BTRFS_FEATURE_INCOMPAT_METADATA_UUID | \
> BTRFS_FEATURE_INCOMPAT_RAID1C34 | \
> BTRFS_FEATURE_INCOMPAT_ZONED | \
> - BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2)
> + BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 | \
> + BTRFS_FEATURE_INCOMPAT_FSCRYPT)

Shouldn't this flag be named "encrypt", to be consistent with the other
filesystems?

- Eric