mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
mds: set fscrypt flag on create if xattr buffer has an encryption context
If the client sends an inode with a crypto context already in the xattr buffer, ensure that we set the fscrypt flag in the inode. Fixes: https://tracker.ceph.com/issues/50305 Signed-off-by: Jeff Layton <jlayton@redhat.com>
This commit is contained in:
parent
ca822b9a8d
commit
3b1bf45d62
@ -3327,6 +3327,9 @@ CInode* Server::prepare_new_inode(MDRequestRef& mdr, CDir *dir, inodeno_t useino
|
||||
auto _xattrs = CInode::allocate_xattr_map();
|
||||
decode_noshare(*_xattrs, p);
|
||||
dout(10) << "prepare_new_inode setting xattrs " << *_xattrs << dendl;
|
||||
if (_xattrs->count("encryption.ctx")) {
|
||||
_inode->fscrypt = true;
|
||||
}
|
||||
in->reset_xattrs(std::move(_xattrs));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user