bug-parted
[Top][All Lists]

## Re: RFC: block size identification

 From: Sven Luther Subject: Re: RFC: block size identification Date: Sun, 22 Jan 2006 00:37:31 +0100 User-agent: Mutt/1.5.9i

```On Sat, Jan 21, 2006 at 07:05:55PM +0100, Patrick Leslie Polzer wrote:
>
> Hello Sven,
>
> On Fri, 20 Jan 2006 01:51:47 +0100
> Sven Luther <Sven Luther <address@hidden>> wrote:
>
>  | There is another use-case of interest here. The amiga partition
>  | table can keep information about the filesystems (sfs/pfs/affs
>  | mostly) inside the individual partition block in the partition table,
>  | among them the block size. Do you have some way of having this taking
>  | in account ? Right now i reread the partition table from the
>  | filesystem code to read in this information, which is hardly nice.
> I'm note sure what you are trying to achieve.

Well, the block size information for the filesystem is in the partition table
block. I currently reread the partition table code in the filesystem code,
because there is no way to pass that information from the partition table code
to the filesystem code.

> To describe my patch in more detail:
> The source files for every file system and disk label will contain
> a static list of block sizes supported by the technology in question.

Cool.

> I understand that you have some redundant code in there, but that
> cannot be avoided with my work.

No, i think it is unrelated.

> But to remedy your problem you could employ some heuristics:
>
> AFFS supports block sizes 2^{9..12}.
> The root block is one block.
> For every x in {9..12} check whether these conditions apply:
>
>     [1] 2^x - 4 = ST.ROOT (where ST.ROOT is the number indicating
>                            secondary type is root block)
>     [2] ulong at 2^x - 12 = 0
>     [3] ulong at 2^x - 16 = 0
>     [4] ulong at 2^x - 48 = 0
>     [5]  char at 2^x - 49 = 0
>
> When this is true, 2^x is the block size of the file system.
> When this is true for more than one x, fall back to the
> partition table stuff.
> All units in bytes.
>
> I don't know how reliable [4] and [5] are -- these are reserved
> fields.  Maybe [1] will suffice.

Nope, this is unrelated.  The information is found in the partition block but
the filesystem layer cannot get it from the partition table.

> Some questions I'm interested in:
>
>  * can Amiga FFS be used with non-Amiga disk labels?

Sure, it just use the default size (512).

>  * why do Amiga file systems register fs{0..7}, e.g.
>    affs0..7 in Parted?  Is this really necessary?
>    Can't this be avoided?

Because there are different kind of affs and co versions, and there was no
other mean to achieve that. if we had the ability to have a root filesystem,
and then various variants, then things would be different.

>  * what Amiga file system is the most popular
>    today? Is AFFS still widely in use among Amiga users?
>    What's the role of sfs and pfs?

AFFS is the historic filesystem, it is needed to boot from on amiga and
pegasos 1 machines. SFS is the newer MorphOS (an amigaos reimplementation
format), so more used than the previous one nowaday, PFS is some shareware
amiga format, i don't think it is much used or we must care about it much.

Friendly,

Sven Luther

```