OSDN Git Service

libceph, rbd: new bio handling code (aka don't clone bios)
authorIlya Dryomov <idryomov@gmail.com>
Sat, 20 Jan 2018 09:30:10 +0000 (10:30 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 2 Apr 2018 08:12:38 +0000 (10:12 +0200)
commit5359a17d2706b86da2af83027343d5eb256f7670
tree31053fe22a0d91b40911882b2aaa961e77504d4b
parenta1fbb5e7bbb56fccdf54bf4ab5086c6080ee5bfa
libceph, rbd: new bio handling code (aka don't clone bios)

The reason we clone bios is to be able to give each object request
(and consequently each ceph_osd_data/ceph_msg_data item) its own
pointer to a (list of) bio(s).  The messenger then initializes its
cursor with cloned bio's ->bi_iter, so it knows where to start reading
from/writing to.  That's all the cloned bios are used for: to determine
each object request's starting position in the provided data buffer.

Introduce ceph_bio_iter to do exactly that -- store position within bio
list (i.e. pointer to bio) + position within that bio (i.e. bvec_iter).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c
include/linux/ceph/messenger.h
include/linux/ceph/osd_client.h
net/ceph/messenger.c
net/ceph/osd_client.c