[dm-devel] [PATCH] 2.6.0-t6-mm1-dm2: 8/7: Allocate another tio in __clone_and_map

Kevin Corry kevcorry at us.ibm.com
Fri Oct 24 15:31:01 UTC 2003


[Found a couple more patches to send in for 2.6.0-t6-mm1-dm2.]

In the "else" section of __clone_and_map(), we're splitting a page from the
bio into two pages and mapping each part separately. Therefore, we need
another tio structure to track the second part of the page.

--- a/drivers/md/dm.c	20 Oct 2003 16:05:53 -0000
+++ b/drivers/md/dm.c	24 Oct 2003 20:10:10 -0000
@@ -497,6 +497,10 @@
 		len = to_sector(bv->bv_len) - max;
 		clone = split_bvec(bio, ci->sector, ci->idx,
 				   bv->bv_offset + to_bytes(max), len);
+		tio = alloc_tio(ci->md);
+		tio->io = ci->io;
+		tio->ti = ti;
+		memset(&tio->info, 0, sizeof(tio->info));
 		__map_bio(ti, clone, tio);
 
 		ci->sector += len;





More information about the dm-devel mailing list