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

mkfs: avoid blockdev failing to re-read partition table #275

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Commits on Apr 25, 2024

  1. mkfs: avoid blockdev failing to re-read partition table

    Invoking `blockdev --rereadpt` straight after creating the file system
    might fail with:
    
    | blockdev: ioctl error on BLKRRPART: Device or resource busy
    | Unexpected non-zero exit code 1 in /sbin/grml-debootstrap /sbin/grml-debootstrap /sbin/grml-debootstrap at line 1376 2132 0 detected!
    | last bash command: blockdev --rereadpt "$main_device"
    
    This is caused by udev kicking in and causing a race condition. Let's
    invoke udevadm settle (which watches the udev event queue, and exits if
    all current events are handled), and then retry `blockdev --rereadpt
    ...` up to 30 times/seconds.
    
    Thanks: Darshaka Pathirana for bug report and initial investigation, and Chris Hofstaedtler for feedback
    Closes: #273
    mika committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    9b2cf83 View commit details
    Browse the repository at this point in the history