[Top][All Lists]

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

Re: Parted 1.6.12

From: Sven Luther
Subject: Re: Parted 1.6.12
Date: Tue, 31 Aug 2004 15:01:21 +0200
User-agent: Mutt/1.5.6+20040523i

On Tue, Aug 31, 2004 at 10:29:48PM +1000, Andrew Clausen wrote:
> Hi Sven,
> On Tue, Aug 31, 2004 at 01:56:22PM +0200, Sven Luther wrote:
> > I have been tryint to upgrade the debian package from a patched 1.6.9 to 
> > this
> > 1.6.12. Am i correct in thinking that the geometry change was the one which
> > broke backward binary compatibility and forced a soname change, or was there
> > something else involved ? 
> struct PedDevice changed, including hw_geom and bios_geom.
> If binaries were looking inside PedDevice, then they might break.
> No public function prototypes changed.


> > > Parted 1.6.12 is now available for download at ftp.gnu.org and
> > > from CVS (cvs.alioth.debian.org:/cvsroot/parted, module "stable").
> > > 
> > > The big news in this release is that Parted now assigns an opinion
> > > about what the CHS geometry is to each partition, rather than to
> > > a whole device.  This means it is more robust when there are
> > > inconsistent partition tables.
> > > 
> > > It also inspects file systems to find CHS geometry.
> > 
> > I also had to report the amiga patch, which you didn't apply to the
> > main CVS tree (any particular reason for that ?).
> Just lack of time... it is a low priority, and there are plenty of
> high priority things left that need attention :/

Well i know of at least one guy who lost his disk trying to install gentoo on
his pegasos system, and the gentoo parted not knowing about amiga partitions
overwrote it with an MBR or something such. Well, probably user error but

> I would like to have a good look at the code.  I had a quick look.


> * you probably want to use that __attribute__ ((packed)) thing for structs.

as in :

struct blah { 
} __attribute__ ((packed))

right ? 

> * you also have too much error handling!  All libparted library calls
> will throw exceptions on failure, so you don't need to throw an
> exception yourself.  Eg: amiga_partition_duplicate() shouldn't throw
> any exceptions.

Mmm, it is not clear which functions should throw exceptions and which not.
For the larger ones it make sense to throw them, since there may be different

> > On amiga partition tables, the geometry is written in the partition
> > table. When the partition table is first written, that data is read
> > from the hw geometry (in the parted case), or using some more advanced
> > heuristic (in the third party tools case). Since partitions are
> > located on cylinder boundaries, this is rather important to get done
> > right.
> Does Linux on Amiga give reliable CHS information?

No idea. I mostly use a pegasos (powerpc/chrp) with 2.6, and it has been some
time since i checked this out on blank media, and since on non-blank media,
the partition table is overwritten anyway ... I will do some checking.

> > When reading a partition table, i used to get the values from the
> > partition table, and overwrite the dev->cylinders|heads|sectors data,
> > and used that in the rest of it. Maybe this was not the best solution,
> > but it seemed to work.
> Sounds good to me.
> > Now, we have a bios_geometry, and a
> > hw_geometry. And which one would i need to set ? Also, i wonder what
> > is the meaning of the bios_geometry on not-x86 hardware, but will
> > probably need to check the source for it.
> It's "user-defined" - i.e. up to the author of disk_*.c.
> I want hw_geom to be strictly what the hard disk controller says it is,
> and bios_geom to be what the OS/firmware/whatever say it is.
> I am open to suggestions.

Well, if i understand this correctly, the amiga_read function will read the
partition table from disk and then fill the hw_geom with the data in it. My
problem is how to make sure other functions will use hw_geom and not bios_geom 

> > Also, you don't seem to have updated doc/API.
> Oops... fixed.
> > > Together, these two features should make libparted much more robust
> > > with DOS partition tables, and hopefully all the dual boot problems
> > > will go away shortly.
> > 
> > What about non-DOS partition tables ?
> I have no idea.  I hope I didn't change the semantics too much for
> non-DOS tables.  Perhaps we need to use the GETGEO ioctl for non-x86?



Sven Luther

reply via email to

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