Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jan 2009 09:50:10 +0200
From:      Jaakko Heinonen <jh@saunalahti.fi>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: [patch] ext2fs freeze/corruption on amd64
Message-ID:  <20090105075009.GB7863@a91-153-125-115.elisa-laajakaista.fi>
In-Reply-To: <20090104160043.GI93900@deviant.kiev.zoral.com.ua>
References:  <20090103182107.GA4119@a91-153-125-115.elisa-laajakaista.fi> <20090104160043.GI93900@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090105075009.GB7863>