Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LtAba-0007p2-Mk for mharc-grub-devel@gnu.org; Sun, 12 Apr 2009 21:04:58 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtAbY-0007kl-Gn for grub-devel@gnu.org; Sun, 12 Apr 2009 21:04:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtAbX-0007ig-MX for grub-devel@gnu.org; Sun, 12 Apr 2009 21:04:55 -0400 Received: from [199.232.76.173] (port=43035 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtAbX-0007iV-EF for grub-devel@gnu.org; Sun, 12 Apr 2009 21:04:55 -0400 Received: from [74.93.104.97] (port=41571 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LtAbW-00024K-4h; Sun, 12 Apr 2009 21:04:54 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 2C578C8C0DD; Sun, 12 Apr 2009 18:04:45 -0700 (PDT) Date: Sun, 12 Apr 2009 18:04:44 -0700 (PDT) Message-Id: <20090412.180444.21302590.davem@davemloft.net> To: grub-devel@gnu.org, proski@gnu.org From: David Miller In-Reply-To: <1239570067.14481.14.camel@ct> References: <1239517755.3887.24.camel@mj> <20090412.010121.183222401.davem@davemloft.net> <1239570067.14481.14.camel@ct> X-Mailer: Mew version 6.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Subject: Re: [PATCH]: grub: Fix ofdisk disk cache corruption. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 01:04:56 -0000 From: Pavel Roskin Date: Sun, 12 Apr 2009 17:01:07 -0400 > It's not just about distribution properties. My impression is that your > code misuses hashes as indices in a table. Let's make the hash 32-bit. > That would make it harder to misuse. They aren't indices in the traditional sense, they are simply unique ID's just like the filesystem UUIDs grub also supports. Their only purpose it to indicate uniqueness, nothing more. Since we have to allocate in-memory objects to remember the previously used paths anyways, it is just the most convenient thing to do to use the address of the object. Other disk drivers do this too, I'm not inventing anything nor doing anything strange here.