/* Get enc context xattr directly instead of going through the VFS,
* as there is no xattr handler for "encryption.".
*/
- rc = ll_xattr_list(inode, LL_XATTR_NAME_ENCRYPTION_CONTEXT,
+ rc = ll_xattr_list(inode, xattr_for_enc(inode),
XATTR_ENCRYPTION_T, ctx, len, OBD_MD_FLXATTR);
/* used as encryption unit size */
if (encctx && encctxlen)
rc = ll_xattr_cache_insert(inode,
- LL_XATTR_NAME_ENCRYPTION_CONTEXT,
+ xattr_for_enc(inode),
encctx, encctxlen);
if (rc)
return rc;
* through the VFS, as there is no xattr handler for "encryption.".
*/
rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode),
- OBD_MD_FLXATTR, LL_XATTR_NAME_ENCRYPTION_CONTEXT,
+ OBD_MD_FLXATTR, xattr_for_enc(inode),
ctx, len, XATTR_CREATE, ll_i2suppgid(inode), &req);
if (rc)
return rc;
}
}
+bool ll_sbi_has_name_encrypt(struct ll_sb_info *sbi)
+{
+ return test_bit(LL_SBI_ENCRYPT_NAME, sbi->ll_flags);
+}
+
+void ll_sbi_set_name_encrypt(struct ll_sb_info *sbi, bool set)
+{
+ if (set)
+ set_bit(LL_SBI_ENCRYPT_NAME, sbi->ll_flags);
+ else
+ clear_bit(LL_SBI_ENCRYPT_NAME, sbi->ll_flags);
+}
+
static bool ll_empty_dir(struct inode *inode)
{
/* used by llcrypt_ioctl_set_policy(), because a policy can only be set
{
}
+bool ll_sbi_has_name_encrypt(struct ll_sb_info *sbi)
+{
+ return false;
+}
+
+void ll_sbi_set_name_encrypt(struct ll_sb_info *sbi, bool set)
+{
+}
+
int ll_setup_filename(struct inode *dir, const struct qstr *iname,
int lookup, struct llcrypt_name *fname,
struct lu_fid *fid)