]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm: mirror sector offset fix
authorNeil Brown <neilb@suse.de>
Thu, 14 Dec 2006 22:07:54 +0000 (23:07 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 14 Dec 2006 22:07:54 +0000 (23:07 +0100)
commitb48a29e3c5bf9f2d2765e3dad81e367b09ccd882
treeba47ef42019397319054fd6e12ece383415895be
parent2d22e81c67b9800c25801cccf75dd49ad5dd0bb3
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.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
drivers/md/dm-raid1.c