Re: [PATCH v2 12/20] btrfs: start using fscrypt hooks.

Josef Bacik
2022-09-08T19:43:52Z

On Mon, Sep 05, 2022 at 08:35:27PM -0400, Sweet Tea Dorminy wrote:
> From: Omar Sandoval <osandov@osandov.com>
>
> In order to appropriately encrypt, create, open, rename, and various symlink
> operations must call fscrypt hooks. These determine whether the inode
> should be encrypted and do other preparatory actions. The superblock
> must have fscrypt operations registered, so implement the minimal set
> also.
>
> Signed-off-by: Omar Sandoval <osandov@osandov.com>
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
> ---
> fs/btrfs/ctree.h | 1 +
> fs/btrfs/file.c | 3 ++
> fs/btrfs/fscrypt.c | 3 ++
> fs/btrfs/fscrypt.h | 1 +
> fs/btrfs/inode.c | 91 ++++++++++++++++++++++++++++++++++++++++------
> fs/btrfs/super.c | 3 ++
> 6 files changed, 90 insertions(+), 12 deletions(-)
>
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 230537a007b6..2b9ba8d77861 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3416,6 +3416,7 @@ struct btrfs_new_inode_args {
> */
> struct posix_acl *default_acl;
> struct posix_acl *acl;
> + bool encrypt;

This doesn't appear to be used in this patch. Thanks,

Josef