tech-userlevel archive

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

Re: wedge like devices and newfs

On May,Friday 29 2009, at 11:57 AM, Manuel Bouyer wrote:

On Fri, May 29, 2009 at 11:09:59AM +0200, Adam Hamsik wrote:
Hi folks,

During my work on LVM and ZFS I have found that for historical reasons I
need to
provide disklables on Logical volumes aka zvols on ZFS. I have found
that problem
is mostly in newfs because it uses DIOCGDINFO to get info about disks.

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. 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

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
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

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.



Home | Main Index | Thread Index | Old Index