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 6/12] handling of 64-bit block counts in e2fsprofs
Date: Tue, 12 Jun 2007 04:02:20 -0600	[thread overview]
Message-ID: <20070612100220.GM5181@schatzie.adilger.int> (raw)
In-Reply-To: <466D7B83.2010508@bull.net>

On Jun 11, 2007  18:42 +0200, Valerie Clement wrote:
> +#ifdef _EXT4FS_
> +#define EXT2_BLOCKS_PER_GROUP(s)	((__u64)EXT2_SB(s)->s_blocks_per_group)
> +#else
>  #define EXT2_BLOCKS_PER_GROUP(s)	(EXT2_SB(s)->s_blocks_per_group)
> +#endif

Are there actually plans for s_blocks_per_group > 2^32?  We can already handle
up to 2^32 groups, so we have plenty of room to spare.

> @@ -573,6 +577,54 @@ struct ext2_super_block {
>  	__u32	s_reserved[167];	/* Padding to the end of the block */
>  };
>  
> +#ifdef _EXT4FS_
> +#define EXT2_BLOCKS_COUNT(s)						\
> +	((s)->s_blocks_count + ((__u64)(s)->s_blocks_count_hi << 32))
> +
> +#define EXT2_BLOCKS_COUNT_SET(s, v)			\
> +	do {						\
> +		(s)->s_blocks_count = (v);		\
> +		(s)->s_blocks_count_hi = (v) >> 32;	\
> +	} while (0)
> +
> +#define EXT2_R_BLOCKS_COUNT(s)						\
> +	((s)->s_r_blocks_count + ((__u64)(s)->s_r_blocks_count_hi << 32))
> +
> +#define EXT2_R_BLOCKS_COUNT_SET(s, v)			\
> +	do {						\
> +		(s)->s_r_blocks_count = (v);		\
> +		(s)->s_r_blocks_count_hi = (v) >> 32;	\
> +	} while (0)
> +
> +#define EXT2_FREE_BLOCKS_COUNT(s)					\
> +	((s)->s_free_blocks_count + ((__u64)(s)->s_free_blocks_hi << 32))
> +
> +#define EXT2_FREE_BLOCKS_COUNT_SET(s, v)		\
> +	do {						\
> +		(s)->s_free_blocks_count = (v);		\
> +		(s)->s_free_blocks_hi = (v) >> 32;	\
> +	} while (0)
> +#else
> +#define EXT2_BLOCKS_COUNT(s)		((s)->s_blocks_count)
> +#define EXT2_R_BLOCKS_COUNT(s)		((s)->s_r_blocks_count)
> +#define EXT2_FREE_BLOCKS_COUNT(s)	((s)->s_free_blocks_count)

I don't think any of this (above or in most/all of the rest of this patch)
should be conditional upon #ifdef _EXT4FS_.  Instead, it should depend on
INCOMPAT_64BIT being set in the superblock.  I don't think it introduces
any compatibility issues by itself.


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

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11 16:42 [RFC][PATCH 6/12] handling of 64-bit block counts in e2fsprofs Valerie Clement
2007-06-12 10:02 ` 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=20070612100220.GM5181@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