Re: [PATCH] device-mapper: dm-raid1: Limit bios to size of mirror region

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alasdair G Kergon <[email protected]> wrote:
>
> Set the target's split_io field when building a dm-mirror device so
> incoming bios won't span the mirror's internal regions.  Without
> this, regions can be accessed while not holding correct locks and data
> corruption is possible.
> 
> Reported-By: "Zhao Qian" <[email protected]>
> From: Kevin Corry <[email protected]>
> Signed-Off-By: Alasdair G Kergon <[email protected]>
> 
> --- diff/drivers/md/dm-raid1.c	2005-06-17 20:48:29.000000000 +0100
> +++ source/drivers/md/dm-raid1.c	2005-06-29 21:12:13.000000000 +0100
> @@ -1060,6 +1060,7 @@
>  	}
>  
>  	ti->private = ms;
> + 	ti->split_io = ms->rh->region_size;
>  
>  	r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client);
>  	if (r) {

Ahem.

drivers/md/dm-raid1.c: In function `mirror_ctr':
drivers/md/dm-raid1.c:1072: invalid type argument of `->'

--- devel/drivers/md/dm-raid1.c~device-mapper-dm-raid1-limit-bios-to-size-of-mirror-region-fix	2005-07-01 00:25:26.000000000 -0700
+++ devel-akpm/drivers/md/dm-raid1.c	2005-07-01 00:25:26.000000000 -0700
@@ -1060,7 +1060,7 @@ static int mirror_ctr(struct dm_target *
 	}
 
 	ti->private = ms;
- 	ti->split_io = ms->rh->region_size;
+ 	ti->split_io = ms->rh.region_size;
 
 	r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client);
 	if (r) {

How well tested was this?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux