Re: [PATCH v2 3/3] block: bio: introduce BIO_ALLOCED flag and check it in bio_free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 23, 2019 at 5:30 AM Keith Busch <kbusch@xxxxxxxxxx> wrote:
>
> 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

multi-page bvec is merged now, 1M isn't the max size any more.

> 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?

I have the same concern, blkdev_bio_end_io_simple() doesn't release
the bio, and this bio shouldn't be released until __blkdev_direct_IO_simple()
returns. How can any underlying driver or block layer free such bio coming
from upper layer?

thanks,
Ming Lei



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux