diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-08-10 00:56:59 -0700 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-08-21 13:58:07 +0200 |
| commit | bbe395ded3ef2a2aecfc90372bda2b3e3ed8f2ee (patch) | |
| tree | 4d4b5fe2cda475dbd75952f589b94796f3958dd8 /fs/ceph/crypto.c | |
| parent | e1add70aaa5ea469980a60a1747ab9863fec2124 (diff) | |
ceph: move crypt info pointer to fs-specific part of inode
Move the fscrypt_inode_info pointer into the filesystem-specific part of
the inode by adding the field ceph_inode_info::i_crypt_info and
configuring fscrypt_operations::inode_info_offs accordingly.
This is a prerequisite for a later commit that removes
inode::i_crypt_info, saving memory and improving cache efficiency with
filesystems that don't support fscrypt.
Co-developed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://lore.kernel.org/20250810075706.172910-7-ebiggers@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ceph/crypto.c')
| -rw-r--r-- | fs/ceph/crypto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c index cab722619207..7026e794813c 100644 --- a/fs/ceph/crypto.c +++ b/fs/ceph/crypto.c @@ -133,6 +133,8 @@ static const union fscrypt_policy *ceph_get_dummy_policy(struct super_block *sb) } static struct fscrypt_operations ceph_fscrypt_ops = { + .inode_info_offs = (int)offsetof(struct ceph_inode_info, i_crypt_info) - + (int)offsetof(struct ceph_inode_info, netfs.inode), .needs_bounce_pages = 1, .get_context = ceph_crypt_get_context, .set_context = ceph_crypt_set_context, |
