[dm-devel] Re: [PATCH 12/17] bottom-layer barrier support

Alasdair G Kergon agk at redhat.com
Mon Apr 27 23:52:26 UTC 2009


On Mon, Apr 27, 2009 at 07:49:44PM -0400, Mikulas Patocka wrote:
> Here it is:
 
> @@ -279,8 +280,9 @@ static int delay_map(struct dm_target *t
>  
>  	if ((bio_data_dir(bio) == WRITE) && (dc->dev_write)) {
>  		bio->bi_bdev = dc->dev_write->bdev;
> -		bio->bi_sector = dc->start_write +
> -				 (bio->bi_sector - ti->begin);
> +		if (bio_sectors(bio))
> +			bio->bi_sector = dc->start_write +
> +					 (bio->bi_sector - ti->begin);
  
Thanks:-)
Now it looks similar to the code in the other simple targets again.

Alasdair
-- 
agk at redhat.com




More information about the dm-devel mailing list