[Drbd-dev] [dm-devel] [PATCH v5 12/12] block: Only clone bio vecs that are in use

Kent Overstreet koverstreet at google.com
Thu Aug 9 05:25:03 CEST 2012


On Wed, Aug 8, 2012 at 8:19 PM, Kent Overstreet <koverstreet at google.com> wrote:
> In particular, if this change breaks anything then the new bio_split()
> _will_ break things.
>
> We need to be clear about our interfaces; in this case bi_idx and
> bi_vcnt, in particular. Either this is a safe change, or it's not. If
> no one knows... that's a bigger problem, and not just for this patch...
>
> Fortunately this code actually has been tested quite a bit (and the bio
> splitting code for even longer), and (somewhat to my surprise) I haven't
> run into any bugs caused by it.

Oh, it's worse than that - remember how bio_kmalloc() works for up to
1024 pages, but bio_alloc_bioset() only up to 256?

We can already have situations where bios are allocated that are
impossible to clone (or if we don't, it's only because of
queue_limits. That's not sketchy at all.)


More information about the drbd-dev mailing list