From owner-freebsd-fs@FreeBSD.ORG Mon Jan 5 07:50:13 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1D961065679 for ; Mon, 5 Jan 2009 07:50:13 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from emh03.mail.saunalahti.fi (emh03.mail.saunalahti.fi [62.142.5.109]) by mx1.freebsd.org (Postfix) with ESMTP id 7C1E88FC1F for ; Mon, 5 Jan 2009 07:50:13 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from saunalahti-vams (vs3-12.mail.saunalahti.fi [62.142.5.96]) by emh03-2.mail.saunalahti.fi (Postfix) with SMTP id 8CED4EBE8C; Mon, 5 Jan 2009 09:50:12 +0200 (EET) Received: from emh03.mail.saunalahti.fi ([62.142.5.109]) by vs3-12.mail.saunalahti.fi ([62.142.5.96]) with SMTP (gateway) id A01B3B57E34; Mon, 05 Jan 2009 09:50:12 +0200 Received: from a91-153-125-115.elisa-laajakaista.fi (a91-153-125-115.elisa-laajakaista.fi [91.153.125.115]) by emh03.mail.saunalahti.fi (Postfix) with SMTP id 3C1B5158A73; Mon, 5 Jan 2009 09:50:10 +0200 (EET) Date: Mon, 5 Jan 2009 09:50:10 +0200 From: Jaakko Heinonen To: Kostik Belousov Message-ID: <20090105075009.GB7863@a91-153-125-115.elisa-laajakaista.fi> References: <20090103182107.GA4119@a91-153-125-115.elisa-laajakaista.fi> <20090104160043.GI93900@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090104160043.GI93900@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) X-Antivirus: VAMS Cc: freebsd-fs@freebsd.org Subject: Re: [patch] ext2fs freeze/corruption on amd64 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 07:50:14 -0000 On 2009-01-04, Kostik Belousov wrote: > Please note that find_next_zero_bit() uses gcc extension to perform > void-pointer arithmetic. Also, at the +2 line, it performs unaligned > access to the uint32_t entities. 76 find_next_zero_bit(void *data, size_t sz, size_t ofs) 77 { 78 uint32_t *p; 79 uint32_t mask; 80 int bit; 81 82 p = (uint32_t*)data + (ofs >> 5); Hmmm, I don't think so. Did you notice that the type of p is uint32_t * (line 78) and that data is casted to uint32_t * for pointer arithmetic (line 82)? Thank you for looking at this. -- Jaakko