]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/scrub: do not attempt to read past the end of an object
authorRonen Friedman <rfriedma@redhat.com>
Thu, 20 Nov 2025 13:54:20 +0000 (07:54 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 30 Nov 2025 07:31:44 +0000 (01:31 -0600)
commitbb05e30092f530de70bc9d28c97142aff9c785bb
tree3237560167581c636aedbdfd462119c13091c150
parent4f50887c1f72ec62aca1309c64c61370913b8e89
osd/scrub: do not attempt to read past the end of an object

When performing deep scrubs, the scrubber reads object data
in strides. Existing code uses a short read to detect the end
of the object (and if the object size is a multiple of the
stride - an extra read is performed, which returns 0 bytes).

The proposed change is to avoid such extra read attempts,
by using our knowledge of the object size.

Also - some minor code cleanups in the relevant function.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/ReplicatedBackend.cc