Date: Mon, 14 Oct 2013 23:06:12 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r256471 - projects/zfsd/head/cddl/sbin/zfsd Message-ID: <201310142306.r9EN6Cj7020212@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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? */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310142306.r9EN6Cj7020212>