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.

Reply via email to