Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jan 2011 14:35:48 -0800
From:      Stef Walter <stef@memberwebs.com>
To:        freebsd-fs@freebsd.org
Subject:   Re: 'zfs list' does abort in make_dataset_handle
Message-ID:  <4D2B89C4.8080300@memberwebs.com>
In-Reply-To: <4D2B8616.4000503@memberwebs.com>
References:  <4D2B8616.4000503@memberwebs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080206050804010103080703
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 01/10/2011 02:20 PM, Stef Walter wrote:
> After a failed zfs receive, zfs list now aborts in make_dataset_handle()
> in libzfs.so.2.

The following patch suppresses the problem, and may give a clear
indication of how the problem manifests.

Cheers,

Stef

--------------080206050804010103080703
Content-Type: text/x-patch;
 name="zfs-abort-bad-head-type.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="zfs-abort-bad-head-type.patch"

--- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c.orig	2011-01-10 22:29:45.000000000 +0000
+++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c	2011-01-10 22:32:11.000000000 +0000
@@ -454,6 +454,10 @@
 	else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZFS)
 		zhp->zfs_head_type = ZFS_TYPE_FILESYSTEM;
-	else
-		abort();
+	else {
+		fprintf (stderr, "WARNING: bad head type: %s\n", zhp->zfs_name);
+		free(zhp);
+		errno = ENOENT;
+		return (NULL);
+	}
 
 	if (zhp->zfs_dmustats.dds_is_snapshot)

--------------080206050804010103080703--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D2B89C4.8080300>