ceph: add fscrypt ioctls and ceph.fscrypt.auth vxattr
authorJeff Layton <jlayton@kernel.org>
Tue, 28 Jul 2020 13:58:43 +0000 (09:58 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 22 Aug 2023 07:01:48 +0000 (09:01 +0200)
commitf061feda6c54ccb02b0f2c09926fb8edd4882fbb
tree7181a6ca595cce754247b63d93af8ff3adde8ed3
parent6b5717bd30ab7f35792d20b71211055bdb43e6de
ceph: add fscrypt ioctls and ceph.fscrypt.auth vxattr

We gate most of the ioctls on MDS feature support. The exception is the
key removal and status functions that we still want to work if the MDS's
were to (inexplicably) lose the feature.

For the set_policy ioctl, we take Fs caps to ensure that nothing can
create files in the directory while the ioctl is running. That should
be enough to ensure that the "empty_dir" check is reliable.

The vxattr is read-only, added mostly for future debugging purposes.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/ioctl.c
fs/ceph/xattr.c