Re: [RFC PATCH 13/35] rbd: Switch from using bvec_iter to iov_iter

From: David Howells
Date: Tue Mar 18 2025 - 18:15:01 EST


Viacheslav Dubeyko <Slava.Dubeyko@xxxxxxx> wrote:

> > + list_for_each_entry(ex, object_extents, oe_item) {
> > + if (ex->oe_objno == objno &&
>
> OK. I see the point that objno should be the same.
>
> > + ex->oe_off <= objoff &&
>
> But why ex->oe_off could be lesser than objoff? The objoff could be not exactly
> the same?
>
> > + ex->oe_off + ex->oe_len >= objoff + xlen) /* paranoia */
>
> Do we really need in this comment? :)
>
> I am still guessing why ex->oe_off + ex->oe_len could be bigger than objoff +
> xlen. Is it possible that object size or offset could be bigger?

Look further on in the patch. The code is preexisting, just moved a bit.

My guess is that we're looking at data from the server so it *has* to be
sanity chacked before we can trust it.

David