From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?SsO2cm4=?= Engel Subject: Re: [Patch 04/18] include/linux/logfs.h Date: Mon, 4 Jun 2007 16:02:13 +0200 Message-ID: <20070604140212.GA15926@lazybastard.org> References: <20070603183845.GA8952@lazybastard.org> <20070603184205.GE8952@lazybastard.org> <200706032342.27252.arnd@arndb.de> <20070604091245.GF14823@lazybastard.org> <1180964303.25232.358.camel@pmac.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Arnd Bergmann , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, akpm@osdl.org, Sam Ravnborg , John Stoffel , Jamie Lokier , Artem Bityutskiy , CaT , Jan Engelhardt , Evgeniy Polyakov , David Weinehall , Willy Tarreau , Kyle Moffett , Dongjun Shin , Pavel Machek , Bill Davidsen , Thomas Gleixner , Albert Cahalan , Pekka Enberg , Roland Dreier , Ondrej Zajicek , Ulisses Furquim To: David Woodhouse Return-path: Received: from lazybastard.de ([212.112.238.170]:59991 "EHLO longford.lazybastard.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753160AbXFDOHA (ORCPT ); Mon, 4 Jun 2007 10:07:00 -0400 Content-Disposition: inline In-Reply-To: <1180964303.25232.358.camel@pmac.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 4 June 2007 14:38:23 +0100, David Woodhouse wrote: > On Mon, 2007-06-04 at 11:12 +0200, J=C3=B6rn Engel wrote: > > On Sun, 3 June 2007 23:42:25 +0200, Arnd Bergmann wrote: > > > On Sunday 03 June 2007, J=C3=B6rn Engel wrote: > > > > +struct logfs_je_spillout { > > > > + __be64 so_segment[0]; > > > > +}__packed; > > >=20 > > > All the on-disk data structures you define in this file have natu= rally > > > aligned members, so the __packed attribute is not needed. > >=20 > > Amen. It is purely paranoia and I don't even know who is out to ge= t me. >=20 > You can _never_ know who is out to get you, or what architecture we'l= l > be ported to next week. >=20 > The advice "don't tell the compiler what you want unless you _know_ > it'll do the wrong thing otherwise" runs counter to everything we've > learned, slowly and painfully, over the last few years. >=20 > We should never rely on compiler behaviour which is undocumented and > unrequired. Even if you know that the ABI forces it to continue to do > the right thing on the platforms you _currently_ care about, it might > not do it on new platforms (or existing platforms you didn't manage t= o > test). >=20 > It would be better if GCC had a 'nopadding' attribute which gave us w= hat > we need without the _extra_ implications about alignment. In the abse= nce > of that, though, you should at _least_ have a check on the size of th= e > structure if you're doing to drop the packed attribute. Adding a size check is simple enough. But given all this I'll put it t= o the very end of my todo list. There are many other optimizations remaining. J=C3=B6rn --=20 Joern's library part 14: http://www.sandpile.org/ - 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