Re: [RFC PATCH 1/2] ceph: add support for encrypted snapshot names

From: Luís Henriques
Date: Tue Mar 15 2022 - 07:05:32 EST


Xiubo Li <xiubli@xxxxxxxxxx> writes:
<...>
> I think there has one simple way. Just think about without setting the
> fscrypt_auth for the '.snap' dir's inode, that is without your this
> patch it works well.
>
> That's because when we create a snapshot under '.snap' dir, since the '.snap'
> dir related inode doesn't have the fscrypt_auth been filled, so when creating a
> new inode for the snapshot it won't fill the fscrypt_auth for the new inode. And
> then in the handle_reply() it can fill the fscrypt auth as expected.
>
> You can make sure that in the ceph_new_inode() just skip setting the
> fscrypt_auth for the new inode if the parent dir is a snapdir, that is
> '.snap/'. And this will just leave it to be filled in the handle_reply().

Ah! That's it! Great suggestion, I'll go test this and send out a new
version later. (And I think I'll need to rebase my patches on top of the
latest changes too.)

Cheers,
--
Luís