From: Linus Torvalds <torvalds@osdl.org>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: swhiteho@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gfs2 endianness bug: be16 assigned to be32 field
Date: Sat, 14 Oct 2006 11:32:09 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610141123580.3952@g5.osdl.org> (raw)
In-Reply-To: <20061014154930.GL29920@ftp.linux.org.uk>
On Sat, 14 Oct 2006, Al Viro wrote:
>
> - leaf->lf_dirent_format = cpu_to_be16(GFS2_FORMAT_DE);
> + leaf->lf_dirent_format = cpu_to_be32(GFS2_FORMAT_DE);
Hmm. Doesn't this change the on-disk format on a LE machine (eg x86)?
In other words, this change makes me nervous. A quick grep seems to
indicate that nothing actually _uses_ this field, so maybe we don't really
care, but I think we should double-check that this is what the GFS2 people
really want.
If we don't want to change the format on a LE machine, then maybe the
gfs2_leaf structure should be changed to be
..
__be16 lf_dirent_format;
__be16 lf_unused;
..
which should keep the bits in the same position on LE.
Regardless, the old code was clearly wrong, since it gives different
on-disk format for a big-endian and a little-endian machine. Al's fix is
proper, but perhaps people would prefer something that breaks the BE
format rather than the LE format. Hmm?
Steven?
Linus
next prev parent reply other threads:[~2006-10-14 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-14 15:49 Al Viro
2006-10-14 18:32 ` Linus Torvalds [this message]
2006-10-16 9:36 ` Steven Whitehouse
2006-10-16 11:19 ` Steven Whitehouse
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=Pine.LNX.4.64.0610141123580.3952@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swhiteho@redhat.com \
--cc=viro@ftp.linux.org.uk \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®