[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: block size identification
From: |
Patrick Leslie Polzer |
Subject: |
Re: RFC: block size identification |
Date: |
Sat, 21 Jan 2006 19:05:55 +0100 |
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.
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.
I understand that you have some redundant code in there, but that
cannot be avoided with my work.
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.
Some questions I'm interested in:
* can Amiga FFS be used with non-Amiga disk labels?
* why do Amiga file systems register fs{0..7}, e.g.
affs0..7 in Parted? Is this really necessary?
Can't this be avoided?
* 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?
Cheers,
Leslie
--
gpg --keyserver pgp.mit.edu --recv-keys 0x52D70289
pgpWlRxbBiw6X.pgp
Description: PGP signature
- RFC: block size identification, Patrick Leslie Polzer, 2006/01/19
- Re: RFC: block size identification, Sven Luther, 2006/01/19
- Re: RFC: block size identification,
Patrick Leslie Polzer <=
- Re: RFC: block size identification, Sven Luther, 2006/01/21
- Re: RFC: block size identification, Patrick Leslie Polzer, 2006/01/22
- Re: RFC: block size identification, Patrick Leslie Polzer, 2006/01/22
- Re: RFC: block size identification, Sven Luther, 2006/01/27
- Re: RFC: block size identification, Patrick Leslie Polzer, 2006/01/29
Re: RFC: block size identification, Otavio Salvador, 2006/01/21