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)