From owner-svn-src-head@FreeBSD.ORG Tue Sep 30 18:50:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 736D1D1C; Tue, 30 Sep 2014 18:50:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F6429B0; Tue, 30 Sep 2014 18:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UIokk4051152; Tue, 30 Sep 2014 18:50:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UIokXo051151; Tue, 30 Sep 2014 18:50:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409301850.s8UIokXo051151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 30 Sep 2014 18:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272324 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 18:50:46 -0000 Author: delphij Date: Tue Sep 30 18:50:45 2014 New Revision: 272324 URL: http://svnweb.freebsd.org/changeset/base/272324 Log: Fix a mismerge in r260183 which prevents snapshot zvol devices being removed and re-instate the fix in r242862. Reported by: Leon Dang , smh MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 30 18:17:28 2014 (r272323) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 30 18:50:45 2014 (r272324) @@ -3550,7 +3550,12 @@ zfs_ioc_destroy_snaps(const char *poolna for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { - (void) zfs_unmount_snap(nvpair_name(pair)); + const char *name = nvpair_name(pair); + + (void) zfs_unmount_snap(name); +#if defined(__FreeBSD__) + (void) zvol_remove_minor(name); +#endif } return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl)); @@ -3644,7 +3649,6 @@ zfs_ioc_destroy_bookmarks(const char *po if (strncmp(name, poolname, poollen) != 0 || (name[poollen] != '/' && name[poollen] != '#')) return (SET_ERROR(EXDEV)); - (void) zvol_remove_minor(name); } error = dsl_bookmark_destroy(innvl, outnvl);