]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: allow sparse reads with a non-zero truncate-seq
authorJeff Layton <jlayton@redhat.com>
Thu, 17 Feb 2022 12:41:31 +0000 (07:41 -0500)
committerJeff Layton <jlayton@redhat.com>
Thu, 31 Mar 2022 16:54:25 +0000 (12:54 -0400)
commit748650b66fbb46fd78cc9b9feddbb82effeae3b8
treea1a450cd34ddd217fc6dd73cf23d5cb130c93f16
parent723fda64a662bb79871e590698268007049bcf7f
osd: allow sparse reads with a non-zero truncate-seq

do_read() just uses the truncate_seq to tell how to cap the length of
the read. I see no reason that sparse reads should do anything
differently.

Change do_sparse_read() to cap the requested length at the truncate_size
if the truncate_seq in the request is newer than the one in the object.

Fixes: https://tracker.ceph.com/issues/54280
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 58f3e8bb98b966935898ef1c3eed61be7768d513)
src/osd/PrimaryLogPG.cc