On Mon, Apr 20, 2009 at 03:57:43AM -0400, Mikulas Patocka wrote: > +static int __clone_and_map_empty_barrier(struct clone_info *ci) > +{ > + unsigned i, j, n; > + n = dm_table_get_num_targets(ci->map); > + for (i = 0; i < n; i++) { > + struct bio *clone; > + struct dm_target *ti = dm_table_get_target(ci->map, i); > + for (j = 0; j < ti->num_flush_requests; j++) { > + struct dm_target_io *tio = alloc_tio(ci->md); > + tio->io = ci->io; > + tio->ti = ti; > + memset(&tio->info, 0, sizeof(tio->info)); > + tio->info.flush_request = j; > + > + clone = bio_alloc_bioset(GFP_NOIO, 0, ci->md->bs); > + __bio_clone(clone, ci->bio); > + clone->bi_destructor = dm_bio_destructor; > + > + __map_bio(ti, clone, tio); I'm editing this one a bit, splitting that middle section out into a separate function to improve readability. (The compiler can optimise it back if it wants.) Alasdair -- agk@xxxxxxxxxx -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel