From owner-freebsd-arch@FreeBSD.ORG Mon Sep 5 10:50:16 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22E5E16A41F; Mon, 5 Sep 2005 10:50:16 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A40443D48; Mon, 5 Sep 2005 10:50:14 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id j85Ao1HY080695; Mon, 5 Sep 2005 13:50:01 +0300 (EEST) (envelope-from dmitry@atlantis.dp.ua) Date: Mon, 5 Sep 2005 13:50:01 +0300 (EEST) From: Dmitry Pryanishnikov To: Poul-Henning Kamp In-Reply-To: <35184.1125657474@phk.freebsd.dk> Message-ID: <20050905134006.B73214@atlantis.atlantis.dp.ua> References: <35184.1125657474@phk.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: bug-followup@freebsd.org, freebsd-arch@freebsd.org Subject: Re: kern/85503: panic: wrong dirclust using msdosfs in RELENG_6 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2005 10:50:16 -0000 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