Re: [RFC PATCH v5 04/19] fscrypt: add fscrypt_context_for_new_inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2021-04-07 at 18:21 -0700, Eric Biggers wrote:
> On Fri, Mar 26, 2021 at 01:32:12PM -0400, Jeff Layton wrote:
> > CephFS will need to be able to generate a context for a new "prepared"
> > inode. Add a new routine for getting the context out of an in-core
> > inode.
> 
> It would be helpful to briefly mention why fscrypt_set_context() can't be used
> instead (like the other filesystems do).
> 

I'll add this to the changelog as well before the next posting, but
basically, when we send a create request to the MDS, we send along a
full set of attributes, including an xattr blob that includes the
encryption.ctx xattr.

If we used fscrypt_set_context then we'd have to make a separate round
trip to set the xattr on the server for every create. We'd also have a
window of time where the inode exists on the MDS but has no encryption
context attached, which could cause race conditions with other clients.
-- 
Jeff Layton <jlayton@xxxxxxxxxx>




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux