Bug 498137
Summary: | _disk_alloc_freespace not handling correct starting sectors | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | David Cantrell <dcantrell> | ||||||
Component: | parted | Assignee: | Joel Andres Granados <jgranado> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | urgent | Docs Contact: | |||||||
Priority: | urgent | ||||||||
Version: | rawhide | CC: | dcantrell, dlehman, jgranado | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-05-11 20:22:18 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 496760 | ||||||||
Attachments: |
|
Description
David Cantrell
2009-04-29 03:08:54 UTC
Created attachment 341690 [details]
parted-1.8.8-alloc-freespace.patch
The following script show the same behavior in parted UI. <snip> #!/bin/bash parted="/usr/local/sbin/parted" dd if=/dev/zero of=test bs=1M count=100 $parted test mklabel msdos $parted test unit s print free $parted test mkpart primary 50M 100M $parted test unit s print free rm test </snip> Notice that the first time the script prints the free space, it starts in sector 0. And the second time it prints the free space it begins in sector 32. (This is with parted from git HEAD.) Created attachment 342857 [details]
msdos metadata creation patch. (Against Upstream)
I followed this to the add_startend_metadata function in parted. Most of the explanation of the patch is in the patch itself.
I ran all the parted tests and everything seems ok. I'm a little worried that it might break some package that depends on parted (It does not change the API though). Comments in this respect appreciated.
I will create a parted package for f11 shortly so we can test this further.
Here is the package with the patch: http://koji.fedoraproject.org/koji/taskinfo?taskID=1340814 (In reply to comment #3) > Created an attachment (id=342857) [details] > msdos metadata creation patch. (Against Upstream) > > I followed this to the add_startend_metadata function in parted. Most of the > explanation of the patch is in the patch itself. > > I ran all the parted tests and everything seems ok. I'm a little worried that > it might break some package that depends on parted (It does not change the API > though). Comments in this respect appreciated. > > I will create a parted package for f11 shortly so we can test this further. The approach looks good to me. Better than the fix I threw together. I don't think this will introduce any regressions in DOS label support. However, I do have some small comments: 1) Is the PC98 label also affected? If so, should probably also fix that code too. 2) parted uses GNU-style code, so check your indentation on some of those wrapping statements. Also, the // for comments may be rejected. Other than that, it looks good to me. 1) I just made a test with pc98 and it behaves correctly with the test in comment #2. The test was performed after applying the patch. 2) Thx for the extra comments :). I already posted the patch upstream but will include your observations if it commes back to me. This should be present in parted-1_8_8-17_fc11 That parted is in the freeze, closing this bug. |