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/11][take 2] handling of 64-bit block counts in e2fsprofs
Date: Thu, 21 Jun 2007 14:29:08 -0600	[thread overview]
Message-ID: <20070621202908.GZ5181@schatzie.adilger.int> (raw)
In-Reply-To: <467A987F.3050802@bull.net>

On Jun 21, 2007  17:25 +0200, Valerie Clement wrote:
> @@ -26,8 +26,11 @@ void ext2fs_swap_super(struct ext2_super
>  	sb->s_inodes_count = ext2fs_swab32(sb->s_inodes_count);
>  	sb->s_blocks_count = ext2fs_swab32(sb->s_blocks_count);
> +	sb->s_blocks_count_hi = ext2fs_swab32(sb->s_blocks_count_hi);
>  	sb->s_r_blocks_count = ext2fs_swab32(sb->s_r_blocks_count);
> +	sb->s_r_blocks_count_hi = ext2fs_swab32(sb->s_r_blocks_count_hi);
>  	sb->s_free_blocks_count = ext2fs_swab32(sb->s_free_blocks_count);
> +	sb->s_free_blocks_hi = ext2fs_swab32(sb->s_free_blocks_hi);
>  	sb->s_free_inodes_count = ext2fs_swab32(sb->s_free_inodes_count);
>  	sb->s_first_data_block = ext2fs_swab32(sb->s_first_data_block);
>  	sb->s_log_block_size = ext2fs_swab32(sb->s_log_block_size);

I prefer to keep the swabbing code in the same order as the field
declarations in the struct.  That makes it easier to verify everything
is handled.

> @@ -1492,14 +1495,15 @@ static void PRS(int argc, char *argv[])
>  	 * Calculate number of blocks to reserve
>  	 */
> -	fs_param.s_r_blocks_count = e2p_percent(reserved_ratio, 
> -						fs_param.s_blocks_count);
> +	EXT2_R_BLOCKS_COUNT_SET(
> +		&fs_param, e2p_percent(
> +			reserved_ratio, EXT2_BLOCKS_COUNT(&fs_param)));

This may as well just be on 2 lines.

> --- e2fsprogs-1.39-tyt3-v7.orig/resize/resize2fs.c	2007-06-21 13:12:03.000000000 +0200
> +++ e2fsprogs-1.39-tyt3-v7/resize/resize2fs.c	2007-06-21 13:13:05.000000000 +0200
> @@ -34,6 +34,7 @@
>   */
>  
>  #include "resize2fs.h"
> +#include "e2p/e2p.h"
>  #include <time.h>
>  
>  #ifdef __linux__			/* Kludge for debugging */

This should go in "resize2fs.h", like all of the other e2fsprogs-specific
headers, and probably should be in a separate patch so Ted can incorporate
it immediately.

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

      reply	other threads:[~2007-06-21 20:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-21 15:25 [RFC][PATCH 6/11][take 2] handling of 64-bit block counts in e2fsprofs Valerie Clement
2007-06-21 20:29 ` 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=20070621202908.GZ5181@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