On Wed, 6 Nov 2013 15:22:36 -0500 Chris Mason wrote: > > Yup - that should actually be safe for all the existing bio_clone() users > > actually, I audited all of them - because normally you're not going to complete > > the original bio until the clone finishes. > > I'd say we need an ack from Neil before we can switch to _fast. The > completions look non-trivial and _fast adds new ordering requirements on > free. I think it should be fairly straight forward to use _fast in md. As Kent says, the original bio that is cloned is (almost) never going to have endio called until all the clones have done their thing and finished up. The only exception is the "behind_pages" stuff in raid1.c. We clearly need to be more careful there. If the "ordering requirements" you mention are simply that the owner of the original may free the biovec, so the clone must have finished using it before that can happen, then that would most easily be fix with mbio->bi_io_vec = r1_bio->behind_bvecs; rather than the current loop which copies all the bv_page pointers. NeilBrown