kern/85503: panic: wrong dirclust using msdosfs in RELENG_6

Dmitry Pryanishnikov dmitry at atlantis.dp.ua
Thu Sep 1 08:56:18 GMT 2005


Hello!

  During the hunting the bug kern/85503 (panic: wrong dirclust in msdosfs)
I've tried to think about the solution, but it seems to be 
architecture-related. The problem is: msdosfs uses pseudo-inodes (that is,
the offset from the start of the partition to the start of directory entry
in bytes) which must therefore have off_t bitness (at least 64 bits). I've
found the primary error (lack of casts leaded to 32-bit result), but then
we should transfer this 64-bit "inode" number to vfs_hash_get(). Oops,
it also limited to u_int (32 bits on i386). Finally, I see that the
primary shortcoming here: in sys/vnode.h we have

         /*
          * vfs_hash:  (mount + inode) -> vnode hash.
          */
         LIST_ENTRY(vnode)       v_hashlist;
         u_int                   v_hash;

I think it's feasible and useful to upgrade type of v_hash to at least off_t.
In our days of large media we will face filesystems with more than 4 billions
files (and thus at least 64-bit inode numbers) quite often. Am I right?


Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE


More information about the freebsd-arch mailing list