Date: Mon, 5 Sep 2005 11:00:42 GMT From: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/85503: panic: wrong dirclust using msdosfs in RELENG_6 Message-ID: <200509051100.j85B0gO2075752@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/85503; it has been noted by GNATS. From: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua> To: Poul-Henning Kamp <phk@haven.freebsd.dk> Cc: freebsd-arch@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/85503: panic: wrong dirclust using msdosfs in RELENG_6 Date: Mon, 5 Sep 2005 13:50:01 +0300 (EEST) Hello! On Fri, 2 Sep 2005, Poul-Henning Kamp wrote: >> 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 > > NFS has the same sort of problem, it has 16 or 32 *bytes* filehandles > that need to hash to 32 bit "inode numbers". > > If you look at vfs_hash_get calls in sys/nfsclient you can see that > it calculates a 32bit hash but then provides a "nfs_vncmpf" function > to do the actual comparison to resolve hash collisions. Indeed, I've missed last 2 arguments of vfs_hash_get(). Actually it seems that the only error here is missing cast. After application of the following patch: ftp://external.atlantis.dp.ua/FreeBSD/PR/85503/msdosfs.patch problem has gone away. Please, if possible, review and commit it. I think this patch is a good MFC candidate for RELENG_6 and RELENG_6_0, since it prevents panic in quite common environment. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509051100.j85B0gO2075752>