lkml.org 
[lkml]   [2013]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: block: Revert bio_clone() default behaviour
On Wed, Nov 06 2013 at  3:22pm -0500,
Chris Mason <chris.mason@fusionio.com> wrote:

> Quoting Kent Overstreet (2013-11-06 15:02:22)
> > On Wed, Nov 06, 2013 at 11:11:30AM -0500, Chris Mason wrote:
> > >
> > > I think the concept of bio ownership is still much too weak, at least
> > > for established users like MD and DM. I don't know how to verify the
> > > sharing of bi_io_vec without some kind of reference counting on the
> > > iovec.
> >
> > What's unclear about it? The rule is just - if you didn't allocate the biovec,
> > don't modify it or use bio_for_each_segment_all() (probably I didn't quite state
> > it clearly enough before though)
>
> That part makes sense. The new rule that scares me is that we can't
> free the src of the clone until all the clones are freed. If it works
> with today's existing users it feels like it is more by accident than
> design. I'm not saying we can't do it, we just need some bigger
> flashing warning lights.

But we probably don't want those warning lights to come with the cost of
managing extra refcounts in the fast path -- so maybe a debug-only
refcount?

Mike


\
 
 \ /
  Last update: 2013-11-06 22:01    [W:0.062 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site