Reliable hard links with mkisofs/ISO-9660/RR
Joerg.Schilling at fokus.fraunhofer.de
Tue Oct 24 05:10:08 PDT 2006
Max Khon <fjoe at samodelkin.net> wrote:
> > FreeBSD currently seems to bascally implement the same fake inode algorithm
> > as SunOS does since ~ 1989.
> > I did extend mkisofs during the past days and started to extend hsfs from
> > Solaris. Once I am ready, I could present the results in case there is someone
> > who is willing to work on the FreeBSD filesystem module, I could explain what
> > needs to be done.
> Please do.
Mkisofs now supports correct link counts for files and directories and
implements an inode number algorithm.
If the sector that immediately follows the VD-sectors and (in case available
the related UDF sectors) starts with "MKI " and if the last 3 bytes of this
sector contain a checksum from the PVD, a new mkisofs that is in the right mode
did create the image.
In this case, the starting LBA numbers in the ISO-9660 directory entries
are useful as inode numbers.
If the SUS-RRIP "PX" entry has a size of 44 bytes, it contains the same number
as RR inode number.
If you switch to this new inode scheme, NFS exports are expeted to work no
longer unless you change the NFS FID algorithm too.
I implemented Solaris hsfs the following way:
- if hsfs sees a non-inode aware filesystem, it uses inode number 16 for
all zero sized files. The files are diistinguished internally from
the LBA/off values for the Directory entry.
- if hsfs sees a inode aware filesystem, it uses the numbers.
- NFS FIDs use LBA/off + inode number.
EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js at cs.tu-berlin.de (uni)
schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
More information about the freebsd-fs