svn commit: r233091 - in projects/nand: sbin/fdisk sys/sys

Grzegorz Bernacki gjb at semihalf.com
Fri Mar 23 05:44:44 UTC 2012


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


More information about the svn-src-projects mailing list