]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes wip-fscrypt
authorJeff Layton <jlayton@kernel.org>
Thu, 25 Aug 2022 13:31:32 +0000 (09:31 -0400)
committerXiubo Li <xiubli@redhat.com>
Fri, 26 Aug 2022 23:58:58 +0000 (07:58 +0800)
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/inode.c

index a8a6e55252c0f4ca336fc2038c5c12c31203ff98..fb507d57cb26a0e4204d3c330b3050466c05d76e 100644 (file)
@@ -3000,6 +3000,10 @@ int ceph_getattr(struct user_namespace *mnt_userns, const struct path *path,
                        stat->nlink = 1 + 1 + ci->i_subdirs;
        }
 
+       if (IS_ENCRYPTED(inode))
+               stat->attributes |= STATX_ATTR_ENCRYPTED;
+       stat->attributes_mask |= STATX_ATTR_ENCRYPTED;
+
        stat->result_mask = request_mask & valid_mask;
        return err;
 }