]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ZFS/MFV: Use cached feature info in spa_add_feature_stats()
authormmacy <mmacy@FreeBSD.org>
Fri, 10 Aug 2018 23:42:11 +0000 (23:42 +0000)
committermmacy <mmacy@FreeBSD.org>
Fri, 10 Aug 2018 23:42:11 +0000 (23:42 +0000)
commitcffd15327b376be09712aca89f96c32b04f683d2
tree54b21a6fdf9df2e9df287ed1508c070536dccad4
parent03591a0d28d16eb16d6230dba8ad986e364bdbb0
ZFS/MFV:    Use cached feature info in spa_add_feature_stats()

commit 417104bdd3c7ce07ec58674dd078f9891c3bc780
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Feb 26 12:24:11 2015 -0800

    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
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c