- To: Kent Overstreet <koverstreet@xxxxxxxxxx>
- Subject: Re: [PATCH v2 09/14] block: Add an explicit bio flag for bios that own their bvec
- From: Vivek Goyal <vgoyal@xxxxxxxxxx>
- Date: Fri, 25 May 2012 12:49:14 -0400
- Cc: Boaz Harrosh <bharrosh@xxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, tj@xxxxxxxxxx, axboe@xxxxxxxxx, agk@xxxxxxxxxx, neilb@xxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, mpatocka@xxxxxxxxxx, sage@xxxxxxxxxxxx, yehuda@xxxxxxxxxxxxxxx
- In-reply-to: <20120524213158.GB22664@google.com>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, May 24, 2012 at 02:31:58PM -0700, Kent Overstreet wrote:
> On Thu, May 24, 2012 at 07:57:34PM +0300, Boaz Harrosh wrote:
> > How do you insure that the original bio which owns the
> > bvec is not freed before the split-out bio.
> >
> > Perhaps calling code needs to make sure by taking an extra
> > ref on the original bio, or something. If so a big fat comment
> > at bio_split is do.
>
> Yeah, just added that.
>
> >
> > And I understand you did not like my suggestion of negating
> > the meaning of the flag, so the default is zero?
> > Please say why?
>
> I liked it at first, but I think I prefer having the flag be set
> if bio_free() must take some action; i.e. you set the flag when you
> allocate bi_io_vec. Also, I think bio_alloc_bioset() getting
> reimplemented is less likely than people open coding bio splitting or
> something that shares bi_io_vec in the future, so it's slightlry less
> likely to be used wrong this way.
Even if you keep it as it is, I thought BIO_OWNS_BVEC probably communicates
the idea better than BIO_HAS_BVEC.
Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux ARM Kernel]
[Linux ARM]
[Linux Omap]
[Fedora ARM]
[IETF Annouce]
[Security]
[Bugtraq]
[Linux]
[Linux OMAP]
[Linux MIPS]
[ECOS]
[Tools]
[DDR & Rambus]
[Asterisk Internet PBX]
[Linux API]
[Monitors]