liblp: Simplify GrowPartition().
The partition resize algorithm duplicates a lot of logic because it handles the final free interval separately from other free intervals. This is unnecessary and makes it harder to change the actual algorithm. This change makes GrowPartition() treat the final free space region the same as free gaps in between partitions. It does this by converting the extent list into a gap list, and then adds a final gap for the remainder of the free space. The resize function no longer has to treat the end of the disk separately. This patch does not change the way partitions are allocated, it is purely a refactoring. Bug: 79173901 Test: liblp_test gtest Change-Id: I4780f20b23fe021eac62de874b061857712c04fe
Loading
Please register or sign in to comment