bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-27 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 03/27/2014 07:10 PM, Brian C. Lane wrote: > I think we should remove the second prompt and only check for > header at end of disk. When we fix the header location we should > also be adjusting LastUsableLBA based on the disk size anyway. We only

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-27 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 03/27/2014 06:48 PM, Brian C. Lane wrote: > Tried that (with my modified code) and it works fine. The header > munge is changing the PE count to 9 from 128 and re-calculating the > checksums. > > I went through the code -- when we rewrite the hea

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-27 Thread Brian C. Lane
On Thu, Mar 27, 2014 at 12:55:31PM -0400, Phillip Susi wrote: > Parted is correct here: the backup *is* in the wrong place, since it > is at the end of where *we* think the disk is rather than where the > header thinks it is. I changed the code to be this way in the first > place so that this comp

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-27 Thread Brian C. Lane
On Thu, Mar 27, 2014 at 12:23:48PM -0400, Phillip Susi wrote: > On 3/27/2014 11:00 AM, Brian C. Lane wrote: > > I haven't seen any evidence of that, and that isn't what's > > happening here. > > Try running the test steps manually so you can see what is going on in > the middle before the test sui

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-27 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Having thought about it over lunch, I think I see what is going on here now. gpt-header-munge is broken and writes the backup to an offset of 2gb rather than 20mb, extending the "disk". But LastUsableLba still says it's 20mb. This caused parted to c

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-27 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/27/2014 11:00 AM, Brian C. Lane wrote: > I haven't seen any evidence of that, and that isn't what's > happening here. Try running the test steps manually so you can see what is going on in the middle before the test suite cleans it up. Last time

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-27 Thread Brian C. Lane
On Wed, Mar 26, 2014 at 10:25:03PM -0400, Phillip Susi wrote: > On 03/26/2014 01:56 PM, Brian C. Lane wrote: > > commit 9e9588c71e introduced a problem with how the backup gpt > > partition's location was checked, and where it was re-written. It > > was using LastUsableLBA plus an offset based on

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-26 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 03/26/2014 01:56 PM, Brian C. Lane wrote: > commit 9e9588c71e introduced a problem with how the backup gpt > partition's location was checked, and where it was re-written. It > was using LastUsableLBA plus an offset based on the number of > parti

bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

2014-03-26 Thread Brian C. Lane
commit 9e9588c71e introduced a problem with how the backup gpt partition's location was checked, and where it was re-written. It was using LastUsableLBA plus an offset based on the number of partition entries. This will not always match up with the end of the disk. eg. during t0210 where the number