V7 filesystem work

Jonathan Naylor g4klx at pop.agri.ch
Sun Feb 21 19:07:50 AEST 1999

Hello Mike and the list

On Sat, 20 Feb 1999, Mike Allison wrote:
> Yeah, I'm interested.  Can you write up what changes the linux port entailed???
> -Mike

I assume you mean the standalone V7 FS program rather than the kernel V7
FS support ?

The code was written in old C, and from a modern C programmers point of
view, rather sloppily. The warnings from the compiler were terrible, so I
added function prototypes, and made the code more ANSI C like. Then I got
rid of a few bugs, in one place I remember a character pointer being
assigned to a character.

I then typedef'd the data types so I could use int8, int16 and int32 in
the code to make it more portable. I stopped using structure overlays onto
the raw data as that is messy and is not good for (a) byte ordering and
(b) structure packing. It also allowed me to stop using the original V7
file headers which would have made a public release of the code

The data is extracted from the raw block data by using special
architecturally neutral functions into locally held structures. That is a
particular win with the block number in three bytes trick that is used in
the inode.

It has been tested on i386/Linux with both glibc 1.0 and glibc 2.0 and
Alpha/Linux, no changes were needed.

Then I added a few new commands to let me look at the superblock and
bootblocks and a few other bits.

Then I released it.

I have just sent a copy of the program to Warren for inclusion in the PUPS
tools section. Its not very big.

Work is progressing on the V7 filesystem in the Linux kernel. Anyone who
wants the patches for that should send me an e-mail. I hope to get it into
the mainstream kernel in the Linux 2.3 series.


More information about the TUHS mailing list