]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: clean up warnings in client
authorChristopher Hoffman <choffman@redhat.com>
Tue, 23 Sep 2025 14:58:32 +0000 (14:58 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:36 +0000 (13:59 +0000)
Fix warnings/errors in ceph API tests that are present in various files
that were introduced by fscrypt feature

src/client/FSCrypt.cc:90:6: error: variable 'olen' set but not used [-Werror,-Wunused-but-set-variable]
   90 |         int olen = 0;
      |             ^
src/client/FSCrypt.cc:91:6: error: variable 'line' set but not used [-Werror,-Wunused-but-set-variable]
   91 |         int line = 0;
      |             ^
src/client/FSCrypt.cc:945:2: error: is this the way to do it? [-Werror,-W#warnings]
  945 | #warning is this the way to do it?
src/client/Client.cc:11850:2: error: read holes [-Werror,-W#warnings]
 11850 | #warning read holes
       |  ^
src/client/Client.cc:11855:2: error: implement file read here [-Werror,-W#warnings]
 11855 | #warning implement file read here
       |  ^
src/client/Inode.cc:847:2: error: need to make sure that we do not skip entire subtree somehow [-Werror,-W#warnings]
  847 | #warning need to make sure that we do not skip entire subtree somehow
      |  ^

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

index 5eb4c90c5ff0c999062d188c36f16eef92957b56..28aa5565951cfd867fee924125b8917fb4c8e340 100644 (file)
@@ -11966,12 +11966,12 @@ int Client::_read_sync(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
     bufferlist tbl;
 
     int wanted = left;
-#warning read holes
+
+    // TODO: Incorporate holes into the read
     filer->read_trunc(in->ino, &in->layout, in->snapid,
                      pos, left, &tbl, 0,
                      in->truncate_size, in->truncate_seq,
                      &onfinish);
-#warning implement file read here
     client_lock.unlock();
     r = wait_and_copy(onfinish, tbl, wanted);
     client_lock.lock();
index 0422fd77a0433268fd2502e0bb92c28bdf21fb73..04c88f54a7a16e1eda29841fce0fdf749eb38592 100644 (file)
@@ -859,7 +859,7 @@ FSCryptContextRef Inode::init_fscrypt_ctx(FSCrypt *fscrypt)
 void Inode::gen_inherited_fscrypt_auth(std::vector<uint8_t> *fsa)
 {
   if (!fscrypt_ctx) {
-#warning need to make sure that we do not skip entire subtree somehow
+    //TODO:Revisit to make sure that we do not skip entire subtree somehow
     return;
   }