lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v12 08/54] ceph: add a has_stable_inodes operation for ceph
On Thu, Mar 31, 2022 at 11:30:44AM -0400, Jeff Layton wrote:
> static struct fscrypt_operations ceph_fscrypt_ops = {
> .key_prefix = "ceph:",
> .get_context = ceph_crypt_get_context,
> .set_context = ceph_crypt_set_context,
> .empty_dir = ceph_crypt_empty_dir,
> + .has_stable_inodes = ceph_crypt_has_stable_inodes,
> };

What is the use case for implementing this? Note the comment in the struct
definition:

/*
* Check whether the filesystem's inode numbers and UUID are stable,
* meaning that they will never be changed even by offline operations
* such as filesystem shrinking and therefore can be used in the
* encryption without the possibility of files becoming unreadable.
*
* Filesystems only need to implement this function if they want to
* support the FSCRYPT_POLICY_FLAG_IV_INO_LBLK_{32,64} flags. These
* flags are designed to work around the limitations of UFS and eMMC
* inline crypto hardware, and they shouldn't be used in scenarios where
* such hardware isn't being used.
*
* Leaving this NULL is equivalent to always returning false.
*/
bool (*has_stable_inodes)(struct super_block *sb);

I think you should just leave this NULL for now.

- Eric

\
 
 \ /
  Last update: 2022-03-31 22:04    [W:0.518 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site