]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Allow for reading raw written data.
authorChristopher Hoffman <choffman@redhat.com>
Thu, 8 May 2025 18:33:36 +0000 (18:33 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:35 +0000 (13:59 +0000)
When looking up the effective_size and the client_fscrypt_as
option is false show the inode size value. This will allow for
reading raw encrypted data when no key is provided.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Inode.cc

index 6533a455183c1b9fed7b29f7cfac375e27ccab0f..e637aa6d0e6f0f53d36b924ecdf8b1b52c5eb366 100644 (file)
@@ -880,7 +880,7 @@ void Inode::gen_inherited_fscrypt_auth(std::vector<uint8_t> *fsa)
 
 uint64_t Inode::effective_size() const
 {
-  if (fscrypt_file.size() < sizeof(uint64_t)) {
+  if (fscrypt_file.size() < sizeof(uint64_t) || !client->cct->_conf.get_val<bool>("client_fscrypt_as")) {
     return size;
   }