svn commit: r256471 - projects/zfsd/head/cddl/sbin/zfsd
Alan Somers
asomers at FreeBSD.org
Mon Oct 14 23:06:13 UTC 2013
Author: asomers
Date: Mon Oct 14 23:06:12 2013
New Revision: 256471
URL: http://svnweb.freebsd.org/changeset/base/256471
Log:
Fix a bug in zfsd: If you pull two drives on a raidz2 pool with at least two
available hotspares, only one will be activated.
cddl/sbin/zfsd/case_file.cc
CaseFile::Replace should return false when zpool_vdev_attach
fails. That way, the operation will be reattempted the next
time that a config_sync event arrives.
Submitted by: alans
Approved by: ken (mentor)
Sponsored by: Spectra Logic Corporation
Modified:
projects/zfsd/head/cddl/sbin/zfsd/case_file.cc
Modified: projects/zfsd/head/cddl/sbin/zfsd/case_file.cc
==============================================================================
--- projects/zfsd/head/cddl/sbin/zfsd/case_file.cc Mon Oct 14 23:02:05 2013 (r256470)
+++ projects/zfsd/head/cddl/sbin/zfsd/case_file.cc Mon Oct 14 23:06:12 2013 (r256471)
@@ -972,6 +972,7 @@ CaseFile::Replace(const char* vdev_type,
nvlist_t *nvroot, *newvd;
zpool_handle_t *zhp;
const char* poolname;
+ bool retval = true;
/* Figure out what pool we're working on */
ZpoolList zpl(ZpoolList::ZpoolByGUID, &m_poolGUID);
@@ -1023,6 +1024,7 @@ CaseFile::Replace(const char* vdev_type,
poolname, VdevGUIDString().c_str(),
libzfs_error_action(g_zfsHandle),
libzfs_error_description(g_zfsHandle));
+ retval = false;
} else {
syslog(LOG_INFO, "Replacing vdev(%s/%s) with %s\n",
poolname, VdevGUIDString().c_str(),
@@ -1030,7 +1032,7 @@ CaseFile::Replace(const char* vdev_type,
}
nvlist_free(nvroot);
- return (true);
+ return (retval);
}
/* Does the argument event refer to a checksum error? */
More information about the svn-src-projects
mailing list