From: Arnd Bergmann Subject: Re: [PATCH 1/7] omfs: define filesystem structures Date: Sat, 29 Mar 2008 04:15:41 +0100 Message-ID: <200803290415.43189.arnd@arndb.de> References: <1206578760-9050-1-git-send-email-me@bobcopeland.com> <20080328201940.GA3974@ucw.cz> <20080328231833.GA16515@hash.localnet> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Pavel Machek , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Bob Copeland Return-path: Received: from moutng.kundenserver.de ([212.227.126.187]:63782 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757083AbYC2DQZ convert rfc822-to-8bit (ORCPT ); Fri, 28 Mar 2008 23:16:25 -0400 In-Reply-To: <20080328231833.GA16515@hash.localnet> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Saturday 29 March 2008, Bob Copeland wrote: > On Fri, Mar 28, 2008 at 09:19:40PM +0100, Pavel Machek wrote: > > On Wed 2008-03-26 20:45:54, Bob Copeland wrote: > > > +struct omfs_header { > > > +=A0=A0=A0__be64 h_self; > > > +=A0=A0=A0__be32 h_body_size; > > > +=A0=A0=A0__be16 h_crc; > > > +=A0=A0=A0char h_fill1[2]; > > > +=A0=A0=A0u8 h_version; > > > +=A0=A0=A0char h_type; > > > +=A0=A0=A0u8 h_magic; > > > +=A0=A0=A0u8 h_check_xor; > > > +=A0=A0=A0__be32 h_fill2; > > > +}; > >=20 > > attribute packed or something? Some strange machine (alpha?) may > > decide to align u8s at 32bit boundaries... >=20 > Thanks, I guess this applies for all the on disk structs. Actually, we don't normally add the attribute((packed)) in cases like this one, where you already have manual padding in it. Marking this structure packed would only cause a small performance loss on accesses of its members on certain architectures, but not have an impact on correctness. No architecture supported by Linux requires higher than natural alignme= nt for any integer types, and a lot of other code would break otherwise. Arnd <>< -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html