From owner-freebsd-fs@FreeBSD.ORG Wed Jun 15 14:09:11 2011 Return-Path: Delivered-To: fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1BEE106566B; Wed, 15 Jun 2011 14:09:11 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (ns1.scsiguy.com [70.89.174.89]) by mx1.freebsd.org (Postfix) with ESMTP id 897028FC14; Wed, 15 Jun 2011 14:09:11 +0000 (UTC) Received: from Justins-MacBook-Pro.local (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.4/8.14.4) with ESMTP id p5FEAWTY020636 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 15 Jun 2011 08:10:32 -0600 (MDT) (envelope-from gibbs@FreeBSD.org) Message-ID: <4DF8BD01.5040206@FreeBSD.org> Date: Wed, 15 Jun 2011 08:09:05 -0600 From: "Justin T. Gibbs" Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201106141710.p5EHAXYS044119@svn.freebsd.org> <20110615094202.GB1975@garage.freebsd.pl> <4DF8A934.8070500@FreeBSD.org> <20110615132458.GK1975@garage.freebsd.pl> In-Reply-To: <20110615132458.GK1975@garage.freebsd.pl> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (aslan.scsiguy.com [70.89.174.89]); Wed, 15 Jun 2011 08:10:32 -0600 (MDT) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: fs@FreeBSD.org Subject: Re: svn commit: r223089 - in head: sys/cam/ata sys/cam/scsi sys/geom sys/sys usr.sbin/diskinfo X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gibbs@FreeBSD.org List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2011 14:09:11 -0000 On 6/15/11 7:24 AM, Pawel Jakub Dawidek wrote: > On Wed, Jun 15, 2011 at 06:44:36AM -0600, Justin T. Gibbs wrote: > >> http://people.freebsd.org/~pjd/patches/geom_property_change.patch > >> > >> Currently it implements only mediasize changes, so the upper layers can > >> act accordingly. The patch also implements ZFS bits to detect vdev size > >> changes and eventually autoexpand the pool. > >> > >> Could you look at the patch and see how we could add property changes to > >> your API? > > > > You say "property," I say "attribute". I used GEOM's string names for > > properties, you used flags. Other than that, I don't see much difference > > in the implementations. > > > > As far as supporting size changes in the API I committed, the intention > > is for the API to support notification of arbitrary provider changes, > > but changes that don't necessarily require consumers to go through a > > costly "re-taste process". If we define a string constant for the size > > property, emit that via "g_attr_changed()" in all the places you currently > > emit g_property_change(), and use strcmp instead of bit tests in your > > handlers, it should work. > > Well, you notify about attributes passed around with BIO_GETATTR, my > change is about changes in provider properties like mediasize and maybe > name in the future. This is different namespace. But I agree that > reserving and using "mediasize" or "GEOM::mediasize" should be fine. Ah. I understand your distinction now. I think it would be best to just have one notification scheme regardless of how the properties/attributes are accessed (directly in a struct or via a getattr call). I even considered folding the spoiling stuff into this but then thought that might be considered too radical a change. As for a size change, at what point is it safe to change the size field in the provider? I know that the ZFS vdevs cache the size data, so the provider bumping its size field shouldn't be a problem, but what about other GEOM consumers? Will the GEOM RAID transforms suddenly and unintentionaly start putting their label information in a different location? Similar situations may apply to other properties/attributes. -- Justin