K 10 svn:author V 7 asomers K 8 svn:date V 27 2016-05-21T02:29:35.140512Z K 7 svn:log V 692 Fix the resource.fs.zfs.statechange message It had a number of problems: * It was only being emitted on a transition to the HEALTHY state. That made it impossible for zfsd to take actions based on drives getting sicker. * It compared the new state to vdev_prevstate, which is the state that the vdev had the last time it was opened. That doesn't make sense, because a vdev can change state multiple times without being reopened. * vdev_set_state contains logic that will change the device's new state based on various conditions. However, the statechange event was being posted _before_ that logic took effect. Now it's being posted after. Sponsored by: Spectra Logic Corp END