]> git-server-git.apps.pok.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>
Mon, 7 Mar 2022 12:42:40 +0000 (07:42 -0500)
commit58f3e8bb98b966935898ef1c3eed61be7768d513
tree195c2bf29ba46841b270e0a207b83dc29dfc61f9
parentec371278ee5bcb806f93dfe91e485c4b8662b55d
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>
src/osd/PrimaryLogPG.cc