bug-parted
[Top][All Lists]
Advanced

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

Re: [PATCH] fix HDIO_GETGEO ioctl for linux


From: Andres Salomon
Subject: Re: [PATCH] fix HDIO_GETGEO ioctl for linux
Date: Thu, 17 Nov 2005 14:35:17 -0500

On Fri, 2005-11-18 at 12:25 -0600, Harley D. Eades III wrote:
> On Thu, 2005-11-17 at 16:12 -0200, Otavio Salvador wrote:
> > "Harley D. Eades III" <address@hidden> writes:
> > 
> > >> So the question is, if /sys/firmware/edd doesn't exist, do we attempt to
> > >> `modprobe edd` from within libparted?  Or is that something that
> > >> libparted should not be doing?
> > > I don't think libparted should be using modprobe to check/init a module.
> > > We could make edd a prereq for libparted or we could find another way
> > > which doesn't involve the use of a linux kernel module.
> > 
> > I'm not sure of this could help but I prefer to send it anyway.
> > 
> > In grub, Fedora folks did a patch to include geometry calc there. Do a
> > look in:
> > 
> > http://svn.debian.org/wsvn/pkg-grub/grub/trunk/debian/patches/geometry-26kernel.diff?op=file&rev=0&sc=0http://svn.debian.org/wsvn/pkg-grub/grub/trunk/debian/patches/geometry-26kernel.diff?op=file&rev=0&sc=0
> > 
> It looks like they added all the necessary "things" to grub instead of
> relying on the kernel to get the geom.  Or am I reading this wrong?

It looks like they get the geometry from the partition table, and fall
back to using HDIO_GETGEO if the sectors or heads they get from the
partition table are incorrect.

The patch could use a serious cleanup, but I think it's a good way to do
things.  In fitting it into parted, I would think the way to go would be
to drop HDIO_GETGEO completely, and fall back to the bios geometry stuff
that parted currently uses (is that really as arbitrary as it looks?
Hardcoding dev->length/4/32, 4, and 32 for C,H,S?)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]