lkml.org 
[lkml]   [2013]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: block: Revert bio_clone() default behaviour
Date
Quoting Mike Snitzer (2013-11-06 15:36:40)
> 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?

I'd be happy with some code comments and a few extra SOBs. In general
I'm happy with the new patches that add _fast and make us explicitly
choose the sharing. Lots of little chances for bugs, but opt-in is a
much better starting point.

-chris


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