[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120524213158.GB22664@google.com>
Date: Thu, 24 May 2012 14:31:58 -0700
From: Kent Overstreet <koverstreet@...gle.com>
To: Boaz Harrosh <bharrosh@...asas.com>
Cc: linux-kernel@...r.kernel.org, linux-bcache@...r.kernel.org,
dm-devel@...hat.com, linux-fsdevel@...r.kernel.org, tj@...nel.org,
axboe@...nel.dk, agk@...hat.com, neilb@...e.de,
drbd-dev@...ts.linbit.com, vgoyal@...hat.com, mpatocka@...hat.com,
sage@...dream.net, yehuda@...newdream.net
Subject: Re: [PATCH v2 09/14] block: Add an explicit bio flag for bios that
own their bvec
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists