HomeFreeBSD

Fix a bug in zfsd: when a drive is experiencing a rapid storm of IO or

Description

Fix a bug in zfsd: when a drive is experiencing a rapid storm of IO or
checksum errors, zfsd will not degrade/fault it until hundreds or thousands
of errors have occured.

cddl/sbin/zfsd/case_file.cc

		RefreshVdevState() iterates through all the system's zpools,
		which involves the ioctls ZFS_IOC_POOL_CONFIGS and
		ZFS_IOC_POOL_STATS.  Both of those acquire
		spa_namespace_lock, which may block for a long time under
		certain circumstances, including when the system has a storm
		of IO or checksum errors.  This change eliminates the call
		to RefreshVdevState() whenever a ZFSEvent is received.
		Instead, RefreshVdevState() will only be called when a
		CaseFile is closed, if necessary.  This way, zfsd won't
		spend too much time blocking on ioctl()s and miss reading
		events from devd.

Submitted by: alans
Approved by: ken (mentor)
Sponsored by: Spectra Logic Corporation

Details

Provenance
asomersAuthored on Oct 14 2013, 9:50 PM
Parents
rG24d87685377b: Make zfsd WARNS=1 safe.
Branches
Unknown
Tags
Unknown

Event Timeline