Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zipl: fix reading 4k disk's geometry #107

Closed

Conversation

nikita-dubrovskii
Copy link
Contributor

Fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1918723

On 4k SCSI disks zipl stores wrong values to 'scsi_mbr.program_table_pointer',
which makes system unbootable.
This happens in 'zipl/src/disk.c:656':

/* Convert file system block to physical */
*physical = mapped * phy_per_fs + subblock;
/* Add partition start */
*physical += info->geo.start;

So 'hd_geometry.start' should be adjusted before being used.

Signed-off-by: Nikita Dubrovskii nikita@linux.ibm.com

Fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1918723

On 4k SCSI disks zipl stores wrong values to 'scsi_mbr.program_table_pointer',
which makes system unbootable.
This happens in 'zipl/src/disk.c:656':

```
/* Convert file system block to physical */
*physical = mapped * phy_per_fs + subblock;
/* Add partition start */
*physical += info->geo.start;

```

So 'hd_geometry.start' should be adjusted before being used.

Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
@stefan-haberland
Copy link
Contributor

Thanks for the patch. With the rework I am fine with it.

@hoeppnerj hoeppnerj closed this in 4a3957f Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants