]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Use effective_size in eof read
authorChristopher Hoffman <choffman@redhat.com>
Thu, 8 Aug 2024 19:50:39 +0000 (19:50 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:34 +0000 (13:59 +0000)
Fixes: https://tracker.ceph.com/issues/67347
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Client.cc

index 80c4ea36b68cf8bfc0251323bbd5d1883380d5a7..2337d9109575da7a677cdf7d123fe402707cbbce 100644 (file)
@@ -11700,8 +11700,8 @@ int Client::_read_async(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
     return 0;
   }
 
-  if (off + len > in->size) {
-    len = in->size - off;    
+  if (off + len > effective_size) {
+    len = effective_size - off;
   }
 
   auto target_len = std::min(len, effective_size - off);