public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Valerie Clement <valerie.clement@bull.net>
Cc: Theodore Tso <tytso@mit.edu>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [RFC][PATCH 8/12] 48-bit extents in e2fsprogs
Date: Tue, 12 Jun 2007 04:10:20 -0600	[thread overview]
Message-ID: <20070612101020.GO5181@schatzie.adilger.int> (raw)
In-Reply-To: <466D7C9C.10500@bull.net>

On Jun 11, 2007  18:47 +0200, Valerie Clement wrote:
> +#ifdef _EXT4FS_
> +#define EXT4_EE_START(e) (((__u64)(e)->ee_start_hi << 32) + (e)->ee_start)
> +#define EXT4_EI_LEAF(ix) (((__u64)(ix)->ei_leaf_hi << 32) + (ix)->ei_leaf)
> +
> +#define EXT4_EE_START_SET(e,blk)			\
> +	do {						\
> +		(e)->ee_start = (blk);			\
> +		(e)->ee_start_hi = (blk) >> 32;		\
> +	} while(0)
> +
> +#define EXT4_EI_LEAF_SET(e,blk)				\
> +	do {						\
> +		(ix)->ei_leaf = (blk);			\
> +		(ix)->ei_leaf_hi = (blk) >> 32;		\
> +	} while(0)
> +#else
> +#define EXT4_EE_START(e)	((e)->ee_start)
> +#define EXT4_EI_LEAF(ix)	((ix)->ei_leaf)
> +
> +#define EXT4_EE_START_SET(e,blk)			\
> +	do {						\
> +		(e)->ee_start = (blk);			\
> +	} while(0)
> +
> +#define EXT4_EI_LEAF_SET(e,blk)				\
> +	do {						\
> +		(ix)->ei_leaf = (blk);			\
> +	} while(0)
> +#endif

Ideally this would also be conditional upon INCOMPAT_64BIT and the fs > 2^32
blocks, because some older versions of the extents code didn't clear the
ee_start_hi and ei_lead fields correctly.

That said, I'm not always sure we have access to a superblock somehow
in every function where we need this macro, and we've been shipping
extents patches and e2fsck which has fixed this problem, but not all of
our customers/partners are using the latest lustre or e2fsprogs, or
have necessarily run e2fsck on their filesystems..

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

      reply	other threads:[~2007-06-12 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11 16:47 [RFC][PATCH 8/12] 48-bit extents in e2fsprogs Valerie Clement
2007-06-12 10:10 ` Andreas Dilger [this message]

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=20070612101020.GO5181@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=valerie.clement@bull.net \
    /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