mirror_zfs/tests/runfiles
George Amanakis 431083f75b
Fixes in persistent error log
Address the following bugs in persistent error log:

1) Check nested clones, eg "fs->snap->clone->snap2->clone2".

2) When deleting files containing error blocks in those clones (from
   "clone" the example above), do not break the check chain.

3) When deleting files in the originating fs before syncing the errlog
   to disk, do not break the check chain. This happens because at the
   time of introducing the error block in the error list, we do not have
   its birth txg and the head filesystem. If the original file is
   deleted before the error list is synced to the error log (which is
   when we actually lookup the birth txg and the head filesystem), then
   we do not have access to this info anymore and break the check chain.

The most prominent change is related to achieving (3). We expand the
spa_error_entry_t structure to accommodate the newly introduced
zbookmark_err_phys_t structure (containing the birth txg of the error
block).Due to compatibility reasons we cannot remove the
zbookmark_phys_t structure and we also need to place the new structure
after se_avl, so it is not accounted for in avl_find(). Then we modify
spa_log_error() to also provide the birth txg of the error block. With
these changes in place we simplify the previously introduced function
get_head_and_birth_txg() (now named get_head_ds()).

We chose not to follow the same approach for the head filesystem (thus
completely removing get_head_ds()) to avoid introducing new lock
contentions.

The stack sizes of nested functions (as measured by checkstack.pl in the
linux kernel) are:
check_filesystem [zfs]: 272 (was 912)
check_clones [zfs]: 64

We also introduced two new tests covering the above changes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #14633
2023-03-28 16:51:58 -07:00
..
common.run Fixes in persistent error log 2023-03-28 16:51:58 -07:00
freebsd.run Expose additional file level attributes 2022-03-07 17:52:03 -08:00
linux.run Configure zed's diagnosis engine with vdev properties 2023-01-23 13:14:25 -08:00
longevity.run OpenZFS 9166 - zfs storage pool checkpoint 2018-06-26 10:07:42 -07:00
perf-regression.run OpenZFS 9184 - Add ZFS performance test for fixed blocksize random read/write IO 2018-07-02 13:46:06 -07:00
sanity.run Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole 2023-01-23 13:19:43 -08:00
sunos.run ZTS: Add a failsafe callback to run after each test 2020-03-10 11:00:56 -07:00