On Mon, 4 Jan 2021 10:37:12 -0800 Keith Busch <kbusch@xxxxxxxxxx> wrote: > On Mon, Jan 04, 2021 at 07:56:11PM +0200, Lauri Kasanen wrote: > > +static blk_status_t get_seg(struct request *req) > > +{ > > + u32 bstart = blk_rq_pos(req) * 512; > > + u32 len = blk_rq_cur_bytes(req); > > + void *dst = bio_data(req->bio); ... > > + memcpy(dst, buf, curlen); > > Is there a reason for using a bounce buffer rather than reading directly > into the destination? DMA alignment restrictions, I wasn't sure what guarantees the bio data buffers have. Or even if they are guaranteed to be X-aligned virtually, whether it holds physically. - Lauri