On Fri, Mar 22, 2019 at 03:05:46PM +0100, Hannes Reinecke wrote: > On 3/22/19 3:02 PM, Christoph Hellwig wrote: > > But how do you manage to get the tiny on-stack bios split? What kind > > of setup is this? > > > It's not tiny if you send a 2M file via direct-io, _and_ have a non-zero > MDTS setting... I see a larger request can create a bio chain (though I think 1M is the max that goes through _simple), but how does the stack bio get used in a bio_put()? The chained bios are allocated through a bio_set, and their bio_end_io() calls bio_put() on themselves through bio_chain_endio(), but that's it. The original's endio is never modified from blkdev_bio_end_io_simple(), so who's calling bio_put() on the on-stack bio?