linux-stable/fs/ceph
Jeff Layton 2d332d5bc4 ceph: fscrypt_auth handling for ceph
Most fscrypt-enabled filesystems store the crypto context in an xattr,
but that's problematic for ceph as xatts are governed by the XATTR cap,
but we really want the crypto context as part of the AUTH cap.

Because of this, the MDS has added two new inode metadata fields:
fscrypt_auth and fscrypt_file. The former is used to hold the crypto
context, and the latter is used to track the real file size.

Parse new fscrypt_auth and fscrypt_file fields in inode traces. For now,
we don't use fscrypt_file, but fscrypt_auth is used to hold the fscrypt
context.

Allow the client to use a setattr request for setting the fscrypt_auth
field. Since this is not a standard setattr request from the VFS, we add
a new field to __ceph_setattr that carries ceph-specific inode attrs.

Have the set_context op do a setattr that sets the fscrypt_auth value,
and get_context just return the contents of that field (since it should
always be available).

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>
2023-08-22 09:01:48 +02:00
..
acl.c ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
addr.c ceph: use osd_req_op_extent_osd_iter for netfs reads 2023-08-22 09:01:48 +02:00
cache.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
cache.h netfs: Further cleanups after struct netfs_inode wrapper introduced 2022-06-10 20:55:21 +01:00
caps.c ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
ceph_frag.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crypto.c ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
crypto.h ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
debugfs.c ceph: fix potential use-after-free bug when trimming caps 2023-04-30 12:37:28 +02:00
dir.c ceph: preallocate inode for ops that may create one 2023-08-22 09:01:47 +02:00
export.c ceph: fail the open_by_handle_at() if the dentry is being unlinked 2022-10-04 19:18:08 +02:00
file.c ceph: preallocate inode for ops that may create one 2023-08-22 09:01:47 +02:00
inode.c ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
io.c ceph: fix kerneldoc copypasta over ceph_start_io_direct 2021-04-27 23:52:23 +02:00
io.h ceph: add buffered/direct exclusionary locking for reads and writes 2019-09-16 12:06:25 +02:00
ioctl.c ceph: remove useless session parameter for check_caps() 2022-12-12 19:15:39 +01:00
ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig ceph: conversion to new fscache API 2022-01-11 22:13:01 +00:00
locks.c filelock: move file locking definitions to separate header file 2023-01-11 06:52:32 -05:00
Makefile ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
mds_client.c ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
mds_client.h ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
mdsmap.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
metric.c ceph: never send metrics if disable_send_metrics is set 2023-07-24 13:15:39 +02:00
metric.h ceph: include average/stdev r/w/m latency in mds metrics 2022-03-21 13:35:16 +01:00
quota.c ceph: fix statfs for subdir mounts 2022-05-25 20:45:14 +02:00
snap.c ceph: trigger to flush the buffer when making snapshot 2023-06-30 12:08:55 +02:00
strings.c ceph: add getvxattr op 2022-03-01 18:26:37 +01:00
super.c ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
super.h ceph: fscrypt_auth handling for ceph 2023-08-22 09:01:48 +02:00
util.c ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c 2020-01-27 16:53:40 +01:00
xattr.c A few filesystem improvements, with a rather nasty use-after-free fix 2023-05-04 14:48:02 -07:00