From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pete Zaitcev Subject: Re: Design challenges in chunkd self-checking Date: Tue, 5 Jan 2010 15:10:45 -0700 Message-ID: <20100105151045.6e752c70@redhat.com> References: <20091222144111.789a5b91@redhat.com> <4B314BAE.4010805@garzik.org> <20091222184014.22c5d1c5@redhat.com> <4B319030.9070906@garzik.org> <20100105134702.1e72ced2@redhat.com> <4B43A902.5070105@garzik.org> <20100105143935.69adb51e@redhat.com> <4B43B4F3.8070500@garzik.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4B43B4F3.8070500@garzik.org> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Jeff Garzik Cc: Project Hail List On Tue, 05 Jan 2010 16:53:55 -0500 Jeff Garzik wrote: > If you have a constant pointer value [for the lifetime of the hash table > entry], use g_direct_hash. If you have a nul-terminated string, GLib > also has g_str_hash. Of course I considered these, but thanks to our keys being a random byte string now (remember whose idea it was?), and not having all keys listed somewhere (obviously), neither works. > Otherwise, I would pick something simple like djb's hash. There is a > version in nfs4d/main.c that you can grab. djb put his code into the > public domain, which makes licensing easy. I'll give it a thought, thanks. I thought I liked Hsui's SuperFastHash, but oh well. -- Pete