]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: FIX: Do not use pba_of_lba0 for copy position calculation
authorAdam Kwolek <adam.kwolek@intel.com>
Thu, 9 Jun 2011 03:00:55 +0000 (13:00 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 9 Jun 2011 03:00:55 +0000 (13:00 +1000)
imsm_manage_reshape() should not shift start copy position.
This offset is passed to manage reshape function /and it is used/
as input parameter in offsets table already.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index fad90d2be9963872eea1b2e8c0016640e0776f99..5c120faee22af7e03de2b2830c1159333933e770 100644 (file)
@@ -8764,9 +8764,7 @@ static int imsm_manage_reshape(
                if ((current_position + next_step) > max_position)
                        next_step = max_position - current_position;
 
-               start = (__le32_to_cpu(map_src->pba_of_lba0) +
-                        __le32_to_cpu(dev->reserved_blocks) +
-                        current_position) * 512;
+               start = current_position * 512;
 
                /* allign reading start to old geometry */
                start_buf_shift = start % old_data_stripe_length;