diff options
author | Alasdair G Kergon <agk@redhat.com> | 2005-07-07 20:59:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:24:11 -0400 |
commit | d88854f08961d26f3a63cfae7972188d26a128e4 (patch) | |
tree | 60a7319d8c79898325baaab17b655acaf2ec8040 /drivers/md | |
parent | 374a6cf281771b23e263efd31fdc896924394dba (diff) |
[PATCH] device-mapper: dm-raid1: Limit bios to size of mirror region
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" <zhaoqian@aaastor.com>
From: Kevin Corry <kevcorry@us.ibm.com>
Signed-Off-By: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-raid1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 6e3cf7e13451..12031c9d3f1e 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -1060,6 +1060,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | ti->private = ms; | 1062 | ti->private = ms; |
1063 | ti->split_io = ms->rh.region_size; | ||
1063 | 1064 | ||
1064 | r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); | 1065 | r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); |
1065 | if (r) { | 1066 | if (r) { |