Date: Sat, 5 Aug 2000 23:36:10 -0400 (EDT)
   From: Roland McGrath <[EMAIL PROTECTED]>

   It was just occurring to me that we could in fact set the filetype field on
   disk in the Hurd ext2fs to the same values that Linux would use.  The Hurd
   semantics essentially require that ext2fs never report a value other than
   DT_UNKNOWN to the user.  However, that doesn't mean we can't store other
   values into directories on disk.  It is the case that in practice that the
   directoriness and translator setting of the link target node are already
   established before dir_link is called (mkdir, symlink, mknod all work this
   way).  So ex2fs does have the information and could write it.  It would
   then be possible by doing direct Hurd RPCs to wind up with on-disk
   directories containing filetype fields that don't correspond to the
   referent inodes' actual types.  These would be perfectly valid things to do
   in the Hurd world, and since the Hurd will only store filetypes and never
   use them, it doesn't affect the Hurd itself one way or another.  These
   situations would never be created by the Hurd on an ext2 filesystem by
   using only POSIX calls, and at any rate e2fsck will just correct them if
   they do get created by some obscure action.

It was reported to me by Thomas Bushnell that this wouldn't work, since
the Hurd allows you to transmogrify files from one type to another
(i.e., symlink to block device to FIFO, or some other insanity like
this) and if you have hard links to the transmogrified inode, the type
information will be wrong.

It's not reasonable to assume that someone will run e2fsck before taking
a Hurd ext2fs and trying to mount it on a Linux system.  Hence, given
that the Hurd isn't going to use the filetype information, and mounting
an ext2 filesystem on the Hurd will likely result in that information
getting corrupted, not allowing Hurd filesystems to use the filetype
field is probably the most reasonable course of action.

                                                - Ted

Reply via email to