K 10 svn:author V 7 asomers K 8 svn:date V 27 2013-10-14T21:59:31.240078Z K 7 svn:log V 1536 zfsd should activate a spare that is newly added to an already-degraded pool cddl/sbin/zfsd/case_file.cc cddl/sbin/zfsd/case_file.h cddl/sbin/zfsd/dev_ctl_event.cc When a config_sync event arrives, reevaluate all open casefiles on the same pool. cddl/sbin/zfsd/case_file.cc When evaluating a config_sync event, try to activate spares if our pool is unhealthy. This is necessary because we don't get any more specific event when a spare is added to a pool. This required adding the CaseFileReEvaluator functor and the CaseFile::ReEvaluateByGuid method. cddl/sbin/zfsd/case_file.cc When processing a statechange event, refresh the vdev state. This is necessary because we could be reevaluating an already-existing casefile that was opened before the pool became degraded. Also, always consume the event, even if we couldn't activate the spare. It's no longer necessary to queue the statechange event since we can now reevaluate CaseFiles on a config_sync event. cddl/sbin/zfsd/case_file.cc In CloseIfSolved(), don't close casefiles for DEGRADED or FAULTED vdevs since we now have the ability to fix them. cddl/sbin/zfsd/dev_ctl_event.cc cddl/sbin/zfsd/dev_ctl_event.h cddl/sbin/zfsd/zfsd.cc Redelegated responsibility for queueing events from DevCtlEvent(and its child classes) to ZfsDaemon. cddl/sbin/zfsd/zfsd.cc In the SIGINFO handler, print unconsumed events as well as saved casefiles. Submitted by: alans Approved by: ken (mentor) Sponsored by: Spectra Logic Corporation END