[dm-devel] [PATCH] 4/9:Reset test bio before submitting

Kevin Corry kevcorry at us.ibm.com
Tue Jan 13 16:58:01 UTC 2004


We can't depend on the test_bio being the same every time it is submitted.
Need to reset some of the fields in the bio each time.
--- diff/drivers/md/dm-mpath.c	2004-01-13 15:09:07.000000000 -0600
+++ source/drivers/md/dm-mpath.c	2004-01-13 15:09:54.000000000 -0600
@@ -215,6 +215,11 @@
 	if (down_trylock(&p->test_lock))
 		return;		/* last test io still pending */
 
+	p->test_bio->bi_sector = 0;
+	p->test_bio->bi_bdev = p->dev->bdev;
+	p->test_bio->bi_size = bdev_hardsect_size(p->dev->bdev);
+	p->test_bio->bi_idx = 0;
+
 	generic_make_request(p->test_bio);
 }
 





More information about the dm-devel mailing list