mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl_helper.device-mapper: fix bug in get_physical_device()
Fix mistake in @fs_offset calculation. Since any logical dm-device can be built of partitions, @fs_offset must not decrease while ascending the "device tree" during the procedure of dm-device resolution (which always starts at the formatted logical device, for which @fs_offset is 0). This bug was not reproducible earlier because of restricted functionality in a combination with side-effects. The fixup is required however by the next patches in the series implementing support of mirrored targets by zipl tool Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
d6b702d579
commit
9cfaac58ea
@@ -860,7 +860,7 @@ static int get_physical_device(struct physical_device *pd, dev_t dev,
|
||||
target_entry_new(makedev(major, minor), target));
|
||||
table_free(table);
|
||||
/* Convert fs_start to offset on parent target */
|
||||
start -= target->start;
|
||||
start += target->start;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user