]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm: mirror sector offset fix
authorNeil Brown <neilb@suse.de>
Mon, 26 Jun 2006 07:27:26 +0000 (00:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Sep 2006 21:51:38 +0000 (14:51 -0700)
commit8135c5c1b9f88c5e1147a5275cd07782c3a54761
tree5bb8b699bb923693db0ba47c0c809140072ff4e4
parent16470822339528fff62338f8cd87a7c48ef2cfa2
dm: mirror sector offset fix

The device-mapper core does not perform any remapping of bios before passing
them to the targets.  If a particular mapping begins part-way into a device,
targets obtain the sector relative to the start of the mapping by subtracting
ti->begin.

The dm-raid1 target didn't do this everywhere: this patch fixes it, taking
care to subtract ti->begin exactly once for each bio.

[akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-raid1.c