HomeFreeBSD

Use cached feature info in spa_add_feature_stats()

Description

Use cached feature info in spa_add_feature_stats()

Avoid issuing I/O to the pool when retrieving feature flags information.
Trying to read the ZAPs from disk means that zpool clear would hang if
the pool is suspended and recovery would require a reboot. To keep the
feature stats resident in memory, we hang a cached nvlist off of the
spa. It is built up from disk the first time spa_add_feature_stats() is
called, and refreshed thereafter using the cached feature reference
counts. spa_add_feature_stats() gets called at pool import time so we
can be sure the cached nvlist will be available if the pool is later
suspended.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3082

Details

Provenance
Ned Bass <bass6@llnl.gov>Authored on Feb 26 2015, 8:24 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 5 2015, 10:11 PM
Parents
rG0e86d309ccc5: Add ZED to zfs.redhat.in script
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG417104bdd3c7: Use cached feature info in spa_add_feature_stats() (authored by Ned Bass <bass6@llnl.gov>).Mar 5 2015, 10:11 PM