imsm: FIX: Calculate backup location based on metadata information

Use metadata information to calculate backup write offset.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-06-09 13:00:55 +10:00 committed by NeilBrown
parent 7b1ab482f6
commit 75b69ea420
1 changed files with 1 additions and 1 deletions

View File

@ -7849,7 +7849,7 @@ int recover_backup_imsm(struct supertype *st, struct mdinfo *info)
write_offset = ((unsigned long long)
__le32_to_cpu(migr_rec->dest_1st_member_lba) +
info->data_offset) * 512;
__le32_to_cpu(map_dest->pba_of_lba0)) * 512;
unit_len = __le32_to_cpu(migr_rec->dest_depth_per_unit) * 512;
if (posix_memalign((void **)&buf, 512, unit_len) != 0)