[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: amiga partitioning support for parted
From: |
Sven Luther |
Subject: |
Re: amiga partitioning support for parted |
Date: |
Wed, 30 Jul 2003 10:09:24 +0200 |
User-agent: |
Mutt/1.5.4i |
On Wed, Jul 30, 2003 at 05:35:16PM +1000, Andrew Clausen wrote:
> On Thu, Jul 24, 2003 at 09:42:18AM +0200, Sven Luther wrote:
> > Hello, ...
> >
> > I have a question concerning <partition_type>_alloc.
> >
> > It seems to me that this function has two purposes, that it allocate the
> > memory needed to create a partition table, but also that it fills in the
> > fields of said partition table for an empty partition.
>
> Correct.
>
> > In case we read the partition table from disk, these values are
> > immediately overwritten by the read data, so in a sense, would it not
> > be better to separate this functionality into an _alloc function which
> > allocate the partition table, and a _init, which fills in a blank
> > partition table ?
>
> I don't think so... I like having everything in a consistent state
> all the time. Also, your proposed way would need more lines of code.
Maybe not calling _alloc before the read, but calling amiga_alloc
directly from amiga_read would be a solution, no ?
> > Also, would it make sense to add a new filesystem type (affs) with only
> > the probe function for now, so that parted can list filesystems of this
> > type ?
>
> Yes.
I have done that, i will try to add support for all the amiga related
filesystems i can find info about (ffs, sfs, pfs, maybe others).
> > Also, most partition table have a feature to set the filesystem type in
> > the partition table, but these seems not to be used at all in parted. I
> > have a disk where parted was not able to probe the filesystems, altough
> > i know that there are ext2 filesystems on it. Is it ok to fall back to
> > the partition table filesystem type if the filesystem was badly detected ?
>
> I think this is rather difficult, given that there has historically
> been lots of confusion over the allocation of partition numbers.
??? I don't understand, what has the partition number to do with this ?
The amiga partitioning scheme is a linked list, the partition number is
not really all that important, in fact, you can modify it by changing
the way the blocks are chained in the list.
> > Also, what happens in the case a partition can be detected has having
> > more than one filesystem on it ?
>
> Parted uses extra heuristics, such as what size the file system
> believes it is (compared to the partition size), and whether there
> are file system consistency errors.
The problem is about filesystem it doesn't know about, like affs.
> > Maybe because an older filesystem of a
> > different type still is present, because it was not overwritten enough
> > when the new filesystem was created, and the _probe function for the
> > old filesystem can detect it, and thus potentially destroy the new
> > filesystem ?
>
> If you try to resize, yes.
:(((
> > What if the filesystem probed and the filesystem type written on the
> > partition table doesn't correspond ? Should i fix it, or just ignore the
> > partition table value for the probed filesystem ?
>
> It probably doesn't matter... I'd ignore it.
The problem is that other OSes which cohabit on the same disk may use
them. They are also linked to a sector list rooted in the Rigid Disk
Block which contains filesystem drivers and such for AmigaOS/MorphOS.
Not to speak about the builtin ROM of the original amiga hardware.
BTW, what do you think i should do about partition sectors with bad
checksums ? Correct them or reject the block ? Or is there a way to give
a warning about that to whatever higher level is using libparted. My
tentatives to use the ped exceptions failed miserably.
Friendly,
Sven Luther
>
> Cheers,
> Andrew
- Re: amiga partitioning support for parted, (continued)
- Re: amiga partitioning support for parted, Andrew Clausen, 2003/07/20
- Re: amiga partitioning support for parted, Sven Luther, 2003/07/21
- Re: amiga partitioning support for parted, Andrew Clausen, 2003/07/21
- Re: amiga partitioning support for parted, Sven Luther, 2003/07/22
- Re: amiga partitioning support for parted, Andrew Clausen, 2003/07/23
- Re: amiga partitioning support for parted, Sven Luther, 2003/07/23
- Re: amiga partitioning support for parted, Andrew Clausen, 2003/07/30
- Re: amiga partitioning support for parted, Sven Luther, 2003/07/30
- Re: amiga partitioning support for parted, Sven Luther, 2003/07/24
- Re: amiga partitioning support for parted, Andrew Clausen, 2003/07/30
- Re: amiga partitioning support for parted,
Sven Luther <=