Skip to content

headerfs: Implement Recovery on Read for Corrupted Headers #315

@mohamedawnallah

Description

@mohamedawnallah

Description

Currently, when a user experiences a partial write, the system fails on subsequent read operations of headers. This forces users to manually delete the corrupted headers to resolve the issue, which is not feasible for end users on mobile platforms.

We need to implement a solution that:

  1. Ensures proper write operations to prevent header corruption (See headerfs: fail gracefully on header write #313)
  2. Adds recovery capability when reading corrupted headers from partial writes

This will improve user experience by handling failure scenarios gracefully without requiring manual intervention, which is especially important for mobile users who lack access to header management tools.

The patch should detect corrupted headers during read operations and either repair them when possible or gracefully reset to a default state, eliminating the current hard failure that leaves the application in an unusable state.

Motivation and Context

Motivated by @Roasbeef's comment #313 (comment).

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