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

storage: fix partial reformat not removing all candidate partitions #2094

Merged
merged 1 commit into from
Oct 1, 2024

Commits on Oct 1, 2024

  1. storage: fix partial reformat not removing all candidate partitions

    When reformatting a disk that has in-use (i.e., mounted) partitions, we
    do a "partial" reformat, which means we attempt to delete all the
    partitions that are *not* in use.
    
    Unfortunately, the implementation was not correct. While iterating over
    the partitions, calling delete_partition affects the iterator. As a
    consequence, some partitions that should have been removed end up
    preserved.
    
    Fixed by iterating over a copy of the container.
    
    LP: #2083322
    
    Signed-off-by: Olivier Gayot <[email protected]>
    ogayot committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    26e0bfd View commit details
    Browse the repository at this point in the history