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>
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));
}