From owner-svn-src-all@FreeBSD.ORG Tue Oct 22 18:47:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7877C4BA; Tue, 22 Oct 2013 18:47:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 51B922F08; Tue, 22 Oct 2013 18:47:37 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7A6CCB918; Tue, 22 Oct 2013 14:47:36 -0400 (EDT) From: John Baldwin To: Alexander Motin Subject: Re: svn commit: r256884 - in head: share/man/man9 sys/geom Date: Tue, 22 Oct 2013 14:47:35 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201310221021.r9MALLhP097274@svn.freebsd.org> In-Reply-To: <201310221021.r9MALLhP097274@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201310221447.35676.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 22 Oct 2013 14:47:36 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2013 18:47:37 -0000 On Tuesday, October 22, 2013 6:21:21 am Alexander Motin wrote: > Author: mav > Date: Tue Oct 22 10:21:20 2013 > New Revision: 256884 > URL: http://svnweb.freebsd.org/changeset/base/256884 > > Log: > Remove Giant-locked drivers support (DISKFLAG_NEEDSGIANT flag) from disk(9). > > Since at least FreeBSD 7 we had only four of them in the base tree, and > in head branch, thanks to jhb@, we have no any for more then a year. I had this additional change in my local branch, what do you think of it? We should probably keep it unless we bump DISK_VERSION and drop support for older disk structures. I think we could probably merge it to 10 along with your change as well: --- //depot/vendor/freebsd/src/sys/geom/geom_disk.c +++ //depot/user/jhb/cleanup/sys/geom/geom_disk.c @@ -654,6 +654,13 @@ dp->d_name, dp->d_unit); return; } + if (dp->d_flags & DISKFLAG_RESERVED) { + printf("WARNING: Attempt to add non-MPSAFE disk %s%d\n", + dp->d_name, dp->d_unit); + printf("WARNING: Ignoring disk %s%d\n", + dp->d_name, dp->d_unit); + return; + } KASSERT(dp->d_strategy != NULL, ("disk_create need d_strategy")); KASSERT(dp->d_name != NULL, ("disk_create need d_name")); KASSERT(*dp->d_name != 0, ("disk_create need d_name")); --- //depot/vendor/freebsd/src/sys/geom/geom_disk.h +++ //depot/user/jhb/cleanup/sys/geom/geom_disk.h @@ -102,6 +102,7 @@ void *d_drv1; }; +#define DISKFLAG_RESERVED 0x1 /* Was NEEDSGIANT */ #define DISKFLAG_OPEN 0x2 #define DISKFLAG_CANDELETE 0x4 #define DISKFLAG_CANFLUSHCACHE 0x8 -- John Baldwin