HomeFreeBSD

Enable the head_errlog feature to remove errors

Description

Enable the head_errlog feature to remove errors

In case check_filesystem() does not error out and does not report
an error, remove that error block from error lists and logs
without requiring a scrub. This can happen when the original file and
all snapshots/clones referencing it have been removed.

Otherwise zpool status will still report that "Permanent errors have
been detected..." without actually reporting any of them.

To implement this change the functions introduced in corrective
receive were modified to take into account the head_errlog feature.

Before this change:

pool: test
state: ONLINE
status: One or more devices has experienced an error resulting in data

corruption.  Applications may be affected.

action: Restore the file in question if possible. Otherwise restore the

     entire pool from backup.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-8A

config:

        NAME                   STATE     READ WRITE CKSUM
        test                   ONLINE       0     0     0
          /home/user/vdev_a    ONLINE       0     0     2

errors: Permanent errors have been detected in the following files:

After this change:

pool: test

state: ONLINE
status: One or more devices has experienced an unrecoverable error. An

attempt was made to correct the error.  Applications are

unaffected.
action: Determine if the device needs to be replaced, and clear the
errors

     using 'zpool clear' or replace the device with 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P

config:

        NAME                   STATE     READ WRITE CKSUM
        test                   ONLINE       0     0     0
          /home/user/vdev_a    ONLINE       0     0     2

errors: No known data errors

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #14813

Details

Provenance
g_amanakis_yahoo.comAuthored on May 9 2023, 3:53 PM
GitHub <noreply@github.com>Committed on May 9 2023, 3:53 PM
Parents
rG4eca03faaf6a: Fixes in head_errlog feature with encryption
Branches
Unknown
Tags
Unknown