Skip to content

erasure code - erasure_code_perf.c only checks for erasure corrections in data rows, not parity rows. #383

Open

Description

@jeffareid

The code should check for erasures in the parity rows, since that is needed if rebuilding an array after a drive replacement.

Activity

  1. pablodelara commented on Jan 27, 2026

    @pablodelara
    Contributor

    Hi @jeffareid. Could you share the command line to reproduce this issue? I am running the following command line and it works fine:
    ./erasure_code/erasure_code_perf -k 4 -p 10 -e 1

  2. pablodelara commented on Jan 28, 2026

    @pablodelara
    Contributor

    Right, that option doesn't work because of the condition that "e <= k". I'll look into it, but there is no issue with any infinite loop, it just prints:
    Number of errors (5) cannot be higher than number of data buffers (4)

  3. jeffareid commented on Jan 28, 2026

    @jeffareid
    Author

    I forgot I had modified it to test an alternate faster encoding scheme (LFSR with self-reciprocal polynomial), which is how it got stuck in a loop. I edited the original issues, and deleted no longer needed posts.

    Suggested changes: the loop to find random error index numbers < k (number of data rows) should be changed to find random numbers < m (total number of rows, data+parity), to check for erasures in both data and parity rows (needed if erasure code used to rebuild an array). With this change, then the number of errors just has to be less than or equal to p (number of parity rows).

  4. pablodelara commented on Feb 5, 2026

    @pablodelara
    Contributor

    Hi @jeffareid. I pushed an update on this application. Feel free to test it ;)

  5. jeffareid commented on Feb 12, 2026

    @jeffareid
    Author

    @pablodelara - erasure_code_update_perf.c should get the same change (%k -> %m).

  6. pablodelara commented on Mar 4, 2026

    @pablodelara
    Contributor

    @pablodelara - erasure_code_update_perf.c should get the same change (%k -> %m).
    I will make the change after the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions