tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wedge like devices and newfs



On Fri, May 29, 2009 at 07:39:33PM +0200, Adam Hamsik wrote:
>> If DIOCGDINFO fails, newfs (and other tools using getdiskinfo()) will 
>> use
>> DIOCGWEDGEINFO.  Maybe having zvols should handle DIOCGWEDGEINFO ?
> Yes but DIOCGWEDGEINFO is used only to get name of parent device on  
> which
> DIOCGDINFO is later called. Everything which was received from WEDGEINFO 
> ioctl
> was later zeroed and replaced by information from CGDINFO call.

No, if WEDGEINFO was used, part2wedge is not called and informations from
WEDGEINFO is not erased.


> Zvols  
> and lvm
> disk devices supports DIOCGDISKINFO and DIOCGWEDGEINFO. Point of my  
> patch is
> add real support for WEDGEINFO ioctl to getdiskinfo() and not add it to 
> disk
> devices.

I'm not sure what you mean by "real support". There is already support for
WEDGEINFO in getdiskinfo(). 

>
>>> I
>>> have written
>>> patch against newfs and kernel disk drivers which changes this
>>> behaviour. With my patch
>>> newfs uses DIOCGDISKINFO and DIOCGWEDGEINFO ioctls to get information
>>> about disk/volume
>>> size.
>>> DIOCGDISKINFO is proplib based ioctl which returns dictionary
>>> defined in disk.h with
>>> disk and disk geometry info. DIOCGWEDGEINFO is ioctl for wedge like
>>> devices(Logical volumes,
>>> zvols, dks), other disk devices should still support old disklabel
>>> ioctls.
>>
>> Why is a new ioctl needed ? I can't see what it does which DIOCGDINFO
>> and DIOCGWEDGEINFO aren't already doing.
>
> It is not new ioctl, it was implemented for wd and ld disks for some  
> time.
> Even other disk devices created device properties, but they haven't used
> disk_ioctl handler to handle it. DISKINFO ioctl is needed to get info
> about disk geometry(size of disk blocks etc.. see disk.h Disk  
> information
> dictionary), WEDGEINFO is later used to get information about partition 
> size,
> its offset etc.

I see.

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index