[Top][All Lists]

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

Re: amiga partitioning support for parted

From: Andrew Clausen
Subject: Re: amiga partitioning support for parted
Date: Wed, 30 Jul 2003 17:35:16 +1000
User-agent: Mutt/1.5.4i

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.


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

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


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

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

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


reply via email to

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