Skip to content

Missing calls to fsync() can leave systems with no valid partition table #137

@DemiMarie

Description

@DemiMarie

Operating systems do not guarantee that writes reach disk in the same order in which they are made, unless O_DIRECT|O_SYNC is used or explicit calls to a flush function (such as fsync() on Unix-like systems or FlushFileBuffers() on Windows) are made and succeed. Therefore, it is possible that both the writes to the primary and backup partition tables can partially succeed, leaving the system with no valid partition table and therefore unbootable.

The solution is to add the needed flushing where necessary. User code cannot provide this flushing because no user code runs in the places where barriers are needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions