From owner-svn-src-head@FreeBSD.ORG Mon Aug 18 19:27:48 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B14EB76; Mon, 18 Aug 2014 19:27:48 +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 56F6E3BE2; Mon, 18 Aug 2014 19:27:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IJRmlW048887; Mon, 18 Aug 2014 19:27:48 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IJRm9P048886; Mon, 18 Aug 2014 19:27:48 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201408181927.s7IJRm9P048886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 18 Aug 2014 19:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270149 - head/sys/geom 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: Mon, 18 Aug 2014 19:27:48 -0000 Author: scottl Date: Mon Aug 18 19:27:47 2014 New Revision: 270149 URL: http://svnweb.freebsd.org/changeset/base/270149 Log: Deal explicitly with possible failures of make_dev_alias_p() in GEOM. Submitted by: Mariusz Zaborski MFC after: 3 days Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Mon Aug 18 18:07:28 2014 (r270148) +++ head/sys/geom/geom_dev.c Mon Aug 18 19:27:47 2014 (r270149) @@ -251,9 +251,10 @@ g_dev_taste(struct g_class *mp, struct g snprintf(buf, sizeof(buf), "%s%s", val, gp->name + len); freeenv(val); - make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, - &adev, dev, "%s", buf); - adev->si_flags |= SI_UNMAPPED; + if ((make_dev_alias_p(MAKEDEV_CHECKNAME|MAKEDEV_WAITOK, + &adev, dev, "%s", buf)) != 0) + printf("Warning: unable to create device " + "alias %s\n", buf); break; } } @@ -263,6 +264,7 @@ g_dev_taste(struct g_class *mp, struct g if (adev != NULL) { adev->si_iosize_max = MAXPHYS; adev->si_drv2 = cp; + adev->si_flags |= SI_UNMAPPED; } g_dev_attrchanged(cp, "GEOM::physpath");