Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Apr 2016 09:48:59 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r297547 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201604040948.u349mxVQ006466@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Apr  4 09:48:58 2016
New Revision: 297547
URL: https://svnweb.freebsd.org/changeset/base/297547

Log:
  MFC r297337: Pass through error code from make_dev_p().
  
  ENAMETOOLONG is much more informative in logs then ENXIO.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Mon Apr  4 09:47:39 2016	(r297546)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Mon Apr  4 09:48:58 2016	(r297547)
@@ -686,13 +686,14 @@ zvol_create_minor(const char *name)
 		bioq_init(&zv->zv_queue);
 		mtx_init(&zv->zv_queue_mtx, "zvol", NULL, MTX_DEF);
 	} else if (zv->zv_volmode == ZFS_VOLMODE_DEV) {
-		if (make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK,
+		error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK,
 		    &dev, &zvol_cdevsw, NULL, UID_ROOT, GID_OPERATOR,
-		    0640, "%s/%s", ZVOL_DRIVER, name) != 0) {
+		    0640, "%s/%s", ZVOL_DRIVER, name);
+		if (error != 0) {
 			kmem_free(zv, sizeof(*zv));
 			dmu_objset_disown(os, FTAG);
 			mutex_exit(&zfsdev_state_lock);
-			return (SET_ERROR(ENXIO));
+			return (error);
 		}
 		zv->zv_dev = dev;
 		dev->si_iosize_max = MAXPHYS;



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