mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 06:42:51 +01:00
zfsd: Check for error from zpool_vdev_online
Onlining a vdev can fail. Log the error if it does. Reviewed by: mav, asomers MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D30882
This commit is contained in:
parent
29e2dbd42c
commit
53b438b242
@ -280,9 +280,17 @@ CaseFile::ReEvaluate(const string &devPath, const string &physPath, Vdev *vdev)
|
||||
|| vdev->PoolGUID() == Guid::InvalidGuid())
|
||||
&& vdev->GUID() == m_vdevGUID) {
|
||||
|
||||
zpool_vdev_online(pool, vdev->GUIDString().c_str(),
|
||||
ZFS_ONLINE_CHECKREMOVE | ZFS_ONLINE_UNSPARE,
|
||||
&m_vdevState);
|
||||
if (zpool_vdev_online(pool, vdev->GUIDString().c_str(),
|
||||
ZFS_ONLINE_CHECKREMOVE | ZFS_ONLINE_UNSPARE,
|
||||
&m_vdevState) != 0) {
|
||||
syslog(LOG_ERR,
|
||||
"Failed to online vdev(%s/%s:%s): %s: %s\n",
|
||||
zpool_get_name(pool), vdev->GUIDString().c_str(),
|
||||
devPath.c_str(), libzfs_error_action(g_zfsHandle),
|
||||
libzfs_error_description(g_zfsHandle));
|
||||
return (/*consumed*/false);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, "Onlined vdev(%s/%s:%s). State now %s.\n",
|
||||
zpool_get_name(pool), vdev->GUIDString().c_str(),
|
||||
devPath.c_str(),
|
||||
|
Loading…
Reference in New Issue
Block a user