diff options
author | George Amanakis <[email protected]> | 2021-07-26 21:30:24 +0200 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-09-14 13:07:44 -0700 |
commit | 406534f807b9dc9055b283c86edb0549579fa2c8 (patch) | |
tree | dcb95c304a7dd80efaef75fd3c9e00661ff3dd01 /tests/runfiles | |
parent | ac573e31053ff4052fb74a0891ba6deae44f497c (diff) |
Fixes in persistent L2ARC
In l2arc_add_vdev() first decide whether the device is eligible for
L2ARC rebuild or whole device trim and then add it to the list of cache
devices. Otherwise l2arc_feed_thread() might already start writing on
the device invalidating previous content as l2ad_hand = l2ad_start.
However l2arc_rebuild_vdev() needs the device present in the cache
device list to figure out its l2arc_dev_t. Fix this by moving most of
l2arc_rebuild_vdev() in a new function l2arc_rebuild_dev() which does
not need to search in the cache device list.
In contrast to l2arc_add_vdev() we do not have to worry about
l2arc_feed_thread() invalidating previous content when onlining a
cache device. The device parameters (l2ad*) are not cleared when
offlining the device and writing new buffers will not invalidate
all previous content. In worst case only buffers that have not had
their log block written to the device will be lost.
Retire persist_l2arc_00{4,5,8} tests since they cover code already
covered by the remaining ones. Test persist_l2arc_006 is renamed to
persist_l2arc_004 and persist_l2arc_007 is renamed to persist_l2arc_005.
Fix a typo in persist_l2arc_004, and remove an assertion that is not
always true from l2arc_arcstats_pos. Also update an assertion in
persist_l2arc_005 and explain why in a comment.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: George Amanakis <[email protected]>
Closes #12365
Diffstat (limited to 'tests/runfiles')
-rw-r--r-- | tests/runfiles/common.run | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run index 5f5e10d13..2421e8aa4 100644 --- a/tests/runfiles/common.run +++ b/tests/runfiles/common.run @@ -934,8 +934,7 @@ tags = ['functional', 'log_spacemap'] [tests/functional/l2arc] tests = ['l2arc_arcstats_pos', 'l2arc_mfuonly_pos', 'l2arc_l2miss_pos', 'persist_l2arc_001_pos', 'persist_l2arc_002_pos', - 'persist_l2arc_003_neg', 'persist_l2arc_004_pos', 'persist_l2arc_005_pos', - 'persist_l2arc_006_pos', 'persist_l2arc_007_pos', 'persist_l2arc_008_pos'] + 'persist_l2arc_003_neg', 'persist_l2arc_004_pos', 'persist_l2arc_005_pos'] tags = ['functional', 'l2arc'] [tests/functional/zpool_influxdb] |