Best effort for minor device removal.
We should just make a best effort when removing zvol minors from the system during destroy. Failure here should never prevent the pool from being destroyed. For example, if a pool is so heavily damaged it cannot be opened (part of the minor removal) we still want to be able to destroy it. The worst case here is we may orphan a few minors but even that is unlikely and not particularly harmful.
This commit is contained in:
parent
20479b4392
commit
0e533b7459
|
@ -1112,9 +1112,8 @@ zfs_ioc_pool_destroy(zfs_cmd_t *zc)
|
|||
{
|
||||
int error;
|
||||
zfs_log_history(zc);
|
||||
error = zvol_remove_minors(zc->zc_name);
|
||||
if (error == 0)
|
||||
error = spa_destroy(zc->zc_name);
|
||||
(void) zvol_remove_minors(zc->zc_name);
|
||||
error = spa_destroy(zc->zc_name);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue