mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] device-mapper: dm-raid1: Limit bios to size of mirror region
@ 2005-06-30 18:19 Alasdair G Kergon
  2005-07-01  7:26 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Alasdair G Kergon @ 2005-06-30 18:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Kevin Corry, Zhao Qian

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>

--- 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) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-01 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-30 18:19 [PATCH] device-mapper: dm-raid1: Limit bios to size of mirror region Alasdair G Kergon
2005-07-01  7:26 ` Andrew Morton
2005-07-01 12:56   ` Kevin Corry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®