in->btime = st->btime;
in->snap_btime = st->snap_btime;
in->snap_metadata = st->snap_metadata;
+ in->fscrypt_auth = st->fscrypt_auth;
}
if ((new_version || (new_issued & CEPH_CAP_LINK_SHARED)) &&
if (new_version ||
(new_issued & (CEPH_CAP_ANY_FILE_RD | CEPH_CAP_ANY_FILE_WR))) {
in->layout = st->layout;
+ in->fscrypt_file = st->fscrypt_file;
update_inode_file_size(in, issued, st->size, st->truncate_seq, st->truncate_size);
}
in->snap_caps |= st->cap.caps;
}
- in->fscrypt = st->fscrypt;
return in;
}
version_t inline_version = 0;
bufferlist inline_data;
- bool fscrypt = false; // fscrypt enabled ?
+ std::vector<uint8_t> fscrypt_auth;
+ std::vector<uint8_t> fscrypt_file;
bool is_root() const { return ino == CEPH_INO_ROOT; }
bool is_symlink() const { return (mode & S_IFMT) == S_IFLNK; }
encode(snap_btime, bl);
encode(file_i->rstat.rsnaps, bl);
encode(snap_metadata, bl);
- encode(file_i->fscrypt, bl);
+ encode(!file_i->fscrypt_auth.empty(), bl);
ENCODE_FINISH(bl);
}
else {
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));
}
pi.inode->ctime = mdr->get_op_stamp();
if (mdr->get_op_stamp() > pi.inode->rstat.rctime)
pi.inode->rstat.rctime = mdr->get_op_stamp();
- if (name == "encryption.ctx"sv)
- pi.inode->fscrypt = true;
pi.inode->change_attr++;
pi.inode->xattr_version++;
std::basic_string<char,std::char_traits<char>,Allocator<char>> stray_prior_path; //stores path before unlink
- bool fscrypt = false; // fscrypt enabled ?
+ std::vector<uint8_t> fscrypt_auth;
+ std::vector<uint8_t> fscrypt_file;
private:
bool older_is_consistent(const inode_t &other) const;
encode(export_ephemeral_random_pin, bl);
encode(export_ephemeral_distributed_pin, bl);
- encode(fscrypt, bl);
+ encode(!fscrypt_auth.empty(), bl);
ENCODE_FINISH(bl);
}
}
if (struct_v >= 17) {
- decode(fscrypt, p);
- } else {
- fscrypt = 0;
+ bool fscrypt_flag;
+ decode(fscrypt_flag, p);
}
DECODE_FINISH(p);
mds_rank_t dir_pin;
std::map<std::string,std::string> snap_metadata;
- bool fscrypt = false; // fscrypt enabled ?
+ std::vector<uint8_t> fscrypt_auth;
+ std::vector<uint8_t> fscrypt_file;
public:
InodeStat() {}
decode(snap_metadata, p);
}
if (struct_v >= 6) {
- decode(fscrypt, p);
+ bool fscrypt_flag;
+
+ decode(fscrypt_flag, p);
}
DECODE_FINISH(p);
}