From owner-svn-src-projects@FreeBSD.ORG Fri Mar 23 05:44:44 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FE63106566B; Fri, 23 Mar 2012 05:44:44 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 0B6518FC18; Fri, 23 Mar 2012 05:44:43 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 7E26BC8A0D; Fri, 23 Mar 2012 06:44:35 +0100 (CET) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id TmOYvORGJU1s; Fri, 23 Mar 2012 06:44:34 +0100 (CET) Received: from [172.17.136.194] (adsl-64-175-228-30.dsl.sntc01.pacbell.net [64.175.228.30]) by smtp.semihalf.com (Postfix) with ESMTPSA id 369C2C5BAD; Fri, 23 Mar 2012 06:44:32 +0100 (CET) Message-ID: <4F6C0DC4.60906@semihalf.com> Date: Fri, 23 Mar 2012 06:44:36 +0100 From: Grzegorz Bernacki User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201203171710.q2HHAFiq079651@svn.freebsd.org> <20120317215156.GJ1340@garage.freebsd.pl> In-Reply-To: <20120317215156.GJ1340@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-projects@freebsd.org, Grzegorz Bernacki , src-committers@freebsd.org Subject: Re: svn commit: r233091 - in projects/nand: sbin/fdisk sys/sys X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 05:44:44 -0000 W dniu 2012-03-17 22:51, Pawel Jakub Dawidek pisze: > On Sat, Mar 17, 2012 at 05:10:15PM +0000, Grzegorz Bernacki wrote: >> Author: gber >> Date: Sat Mar 17 17:10:14 2012 >> New Revision: 233091 >> URL: http://svn.freebsd.org/changeset/base/233091 >> >> Log: >> Add ioctl and structures for accessing nand disk devices. > Grzegorz, this is really wrong way to do it. Neither geom_dev nor > geom_disk are the places to add NAND specific ioctls. > > The DEV GEOM class will forward unknown ioctl to provider's class. In > this case to the DISK class. The DISK class will also forward ioctls to > your method. Take a look at the g_disk_ioctl() function. When you > configure your disk structure between disk_alloc() and disk_create() you > just need to set d_ioctl field to your ioctl method and handle all > ioctls specific to your class there. See disk(9) for more info. > > Ioctl is also the way you should send/receive metadata (eventually > BIO_GETATTR) and not to introduce new BIO types that will only be used > by one GEOM class. > > Don't hesitate to discuss this stuff on the freebsd-geom@ mailing list > to avoid surprises on the commit day. Hi Pawel, I am changing code the way suggested. I am going to get rid of our code in geom generic files and use ioctl to read/write metadata. I will commit code soon, so it can be reviewed and discussed. regards, grzesiek