From: Jeff Layton Date: Thu, 25 Aug 2022 13:31:32 +0000 (-0400) Subject: ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2Fwip-fscrypt;p=ceph-client.git ceph: report STATX_ATTR_ENCRYPTED on encrypted inodes Reviewed-by: Xiubo Li Signed-off-by: Jeff Layton --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index a8a6e55252c0..fb507d57cb26 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -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; }