LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Bob Copeland <me@bobcopeland.com>
Cc: Pavel Machek <pavel@ucw.cz>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/7] omfs: define filesystem structures
Date: Sat, 29 Mar 2008 04:15:41 +0100 [thread overview]
Message-ID: <200803290415.43189.arnd@arndb.de> (raw)
In-Reply-To: <20080328231833.GA16515@hash.localnet>
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 {
> > > + __be64 h_self;
> > > + __be32 h_body_size;
> > > + __be16 h_crc;
> > > + char h_fill1[2];
> > > + u8 h_version;
> > > + char h_type;
> > > + u8 h_magic;
> > > + u8 h_check_xor;
> > > + __be32 h_fill2;
> > > +};
> >
> > attribute packed or something? Some strange machine (alpha?) may
> > decide to align u8s at 32bit boundaries...
>
> 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 alignment
for any integer types, and a lot of other code would break otherwise.
Arnd <><
next prev parent reply other threads:[~2008-03-29 3:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 0:45 Bob Copeland
2008-03-28 20:19 ` Pavel Machek
2008-03-28 23:18 ` Bob Copeland
2008-03-29 3:15 ` Arnd Bergmann [this message]
2008-03-29 15:29 ` Jamie Lokier
2008-03-30 3:16 ` Bob Copeland
2008-04-12 22:58 Bob Copeland
2008-04-13 8:03 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200803290415.43189.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=pavel@ucw.cz \
--subject='Re: [PATCH 1/7] omfs: define filesystem structures' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).