portier@dutesta.uucp (Robert Portier) (09/09/87)
In comp.sys.ibm.pc.rt nobody replied. So I try again in other newsgroups:
Hello out there,
Does anyone know something about the layout of the (AIX) file
system on the floppy of the IBM RT-PC?
We are trying to implement a file system supporting indexed files
on the (high density) floppy drive.
According to the AIX OS Technical Reference the structure of
the superblock is compatible with the file system of the IBM PC/IX.
The format of the PC/IX-format file sytem superblock as given in
the AIX Operating System Technical Reference (june 3 1986, page 4-76)
is:
typedef struct filsys
{
ushort s_isize; /* size in blocks of i-list */
daddr_t s_fsize; /* size in blocks of entire volume */
short s_nfree; /* number of address in s_free */
daddr_t s_free[NICFREE]; /* free block list */
short s_ninode; /* number of inodes in s_inode */
ino_t s_inode[NICINOD]; /* free I-node list */
char s_flock; /* lock during free list manipulation */
char s_ilock; /* lock during i-list manipulation */
char s_fmod; /* superblock modified flag */
char s_ronly; /* mounted read-only flag */
time_t s_time; /* last superblock update */
short s_dinfo[4]; /* device information */
daddr_t s_tfree; /* total free blocks */
ino_t s_tinode; /* total free i-nodes */
char s_fname[6]; /* file system name */
char s_fpack[6]; /* file system pack name */
long s_fill[13]; /* fill out to 512 bytes */
daddr_t s_swaplo; /* start of swap area */
daddr_t s_nswap; /* number of blocks of swap */
long s_magic; /* magic number of file system */
long s_type; /* file system type -cluster size */
};
#define s_m s_dinfo[0] /* modulo factor in superblock */
#define s_n s_dinfo[1] /* cylinder size in superblock */
#define s_bsize s_dinfo[2] /* block size for this file system */
Mapping block 1 of the floppy (which should be the superblock) on to
the superblock structure given above and extracting information,
gives us no more information than the file system name and file
system pack name. Trying to extract other information from the structure
results in *garbage*.
(While mapping the superblock to the the structure,
we have taken into account the 8 pad bytes which the compiler adds
to the structure to align the 4-byte data types.)
Typing the command 'od -dc /dev/fd0 0.' or 'od -dc /dev/rfd0 0.' has lead
us to believe that some of the information that is usually present in the
superblock, like the file system size and block size, are actually stored
in the bootblock (block 0 on the floppy).
Are we doing something wrong, or what? Can someone enlighten us.
We appreciate any help.
Robert & Apoorv.
[non-relevent long quote elided. -mod]
--
###########################################################################
Robert John Portier | UUCP: ..!mcvax!dutrun!dutesta!portier
Delft University of Technology |
Faculty of Electical Engineering |
Department of Digital Systems |
and Computer Architecture |
The Netherlands |