diff options
author | George Amanakis <[email protected]> | 2023-05-09 17:53:27 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-05-09 08:53:27 -0700 |
commit | 6839ec6f1098c28ff7b772f1b31b832d05e6b567 (patch) | |
tree | 345cc9e26ff456f1ec832fea735708c68337f134 /include/sys | |
parent | 4eca03faaf6a1c05d739c738e3d5c0df2931da98 (diff) |
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 <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes #14813
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/spa.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sys/spa.h b/include/sys/spa.h index b96a9ef1d..460ea2bfe 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -1140,7 +1140,8 @@ extern const char *spa_state_to_name(spa_t *spa); struct zbookmark_phys; extern void spa_log_error(spa_t *spa, const zbookmark_phys_t *zb, const uint64_t *birth); -extern void spa_remove_error(spa_t *spa, zbookmark_phys_t *zb); +extern void spa_remove_error(spa_t *spa, zbookmark_phys_t *zb, + const uint64_t *birth); extern int zfs_ereport_post(const char *clazz, spa_t *spa, vdev_t *vd, const zbookmark_phys_t *zb, zio_t *zio, uint64_t state); extern boolean_t zfs_ereport_is_valid(const char *clazz, spa_t *spa, vdev_t *vd, |