public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Christoph Hellwig <hch@lst.de>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] superblock endianess annotations
Date: Mon, 23 Jul 2007 10:24:32 +1000	[thread overview]
Message-ID: <20070723002432.GL31489@sgi.com> (raw)
In-Reply-To: <20070720163303.GB6902@lst.de>

On Fri, Jul 20, 2007 at 06:33:03PM +0200, Christoph Hellwig wrote:
> Creates a new xfs_dsb_t that is __be annotated and keeps xfs_sb_t for
> the incore one.  xfs_xlatesb is renamed to xfs_sb_to_disk and only
> handles the incore -> disk conversion.  A new helper xfs_sb_from_disk
> handles the other direction and doesn't need the slightly hacky
> table-driven approach because we only ever read the full sb from disk.

Nice. There's some good cleanups in this patch....

> The handling of shared r/o filesystems has been buggy on little endian
> system and fixing this required shuffling around of some code in that
> area.

*nod*

>  
>  /*
> + * Superblock - on disk version.  Must match the in core version below.
> + */
> +typedef struct xfs_dsb {
> +	__be32		sb_magicnum;	/* magic number == XFS_SB_MAGIC */
.....
> +	__be16		sb_logsectsize;	/* sector size for the log, bytes */
> +	__be32		sb_logsunit;	/* stripe unit size for the log */
> +	__be32		sb_features2;	/* additional feature bits */
> +} xfs_dsb_t;

Should this be packed so we don't reintroduce have the problem we currently
do with 32-vs-64-bit alignment of the last field(s) in the structure?

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2007-07-23  0:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-20 16:33 [PATCH] superblock endianess annotations Christoph Hellwig
2007-07-23  0:24 ` David Chinner [this message]
2007-07-23  8:45   ` 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=20070723002432.GL31489@sgi.com \
    --to=dgc@sgi.com \
    --cc=hch@lst.de \
    --cc=xfs@oss.sgi.com \
    /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