From 0e533b745972f5e7872b21cdd8dab4e0f31c002a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Jul 2010 14:20:56 -0700 Subject: [PATCH] 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. --- module/zfs/zfs_ioctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index a41c2762bd..1befd58631 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -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); }