libceph: fix breakage caused by multipage bvecs
authorIlya Dryomov <idryomov@gmail.com>
Fri, 22 Mar 2019 21:14:19 +0000 (22:14 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 25 Mar 2019 21:28:07 +0000 (22:28 +0100)
commit187df76325af5d9e12ae9daec1510307797e54f0
treebd3b2b26f3dfaed772ca6a63a632c731abb30979
parent8c2ffd9174779014c3fe1f96d9dc3641d9175f00
libceph: fix breakage caused by multipage bvecs

A bvec can now consist of multiple physically contiguous pages.
This means that bvec_iter_advance() can move to a different page while
staying in the same bvec (i.e. ->bi_bvec_done != 0).

The messenger works in terms of segments which can now be defined as
the smaller of a bvec and a page.  The "more bytes to process in this
segment" condition holds only if bvec_iter_advance() leaves us in the
same bvec _and_ in the same page.  On next bvec (possibly in the same
page) and on next page (possibly in the same bvec) we may need to set
->last_piece.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/messenger.c