linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jose R. Santos" <jrs@us.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 4/4][e2fsprogs] New bitmap and inode table allocation for FLEX_BG
Date: Fri, 3 Aug 2007 07:27:23 -0500	[thread overview]
Message-ID: <20070803072723.3c8f2047@gara> (raw)
In-Reply-To: <46B2CBB8.8070007@linux.vnet.ibm.com>

On Fri, 03 Aug 2007 12:01:20 +0530
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:

> 
> 
> Jose R. Santos wrote:
> > From: Jose R. Santos <jrs@us.ibm.com>
> > 
> > Ne
> > +	case ALLOC_INODE_TABLES:
> > +		for (i=0, blk=new_blk; i < count; i++, blk++) {
> 
> I guess you can drop the blk update in the for() loop above. 

This was from the remains of the very first attempt at inode table
allocation.  Thanks for catching.

> 
> > +			retval = ext2fs_get_free_blocks(fs, start_blk, last_blk,
> > +							fs->inode_blocks_per_group,
> > +							bmap, &new_blk);
> > +			if (retval)
> > +				return retval;
> > +			for (j=0, blk = new_blk;
> > +			     j < fs->inode_blocks_per_group; j++, blk++)
> > +				ext2fs_mark_block_bitmap(bmap, blk);
> > +			fs->group_desc[group+i].bg_inode_table = new_blk;
> > +		}
> > +		break;
> > +
> > +	}
> > +	return 0;
> > +}
> > +
> > +
> > +
> > +errcode_t ext2fs_allocate_flex_groups(ext2_filsys fs)
> > +{
> > +	errcode_t	retval;
> > +	blk_t		start, last, j, blocks;
> > +	dgrp_t		i, k;
> > +	int		gpm;
> > +
> > +	gpm = GROUPS_PER_FLEXBG;
> > +	blocks = 0;
> > +
> > +	for (i = 0; i < fs->group_desc_count; i=i+gpm) {
> > +		if (i == 0 )
> > +			start = ext2fs_group_first_block(fs,
> > +							 FIRST_METADATA_GROUP);
> > +		else
> > +			start = ext2fs_group_first_block(fs, i);
> > +
> > +		if (i+gpm-1 > fs->group_desc_count) {
> 		
> 
> 		if (i+gpm >= fs->group_desc_count) 

Update.

> 
> > +			last = ext2fs_group_last_block(fs, fs->group_desc_count);
> > +			gpm = fs->group_desc_count - i;
> > +		}
> 
> 
> -aneesh

Thanks

-JRS

  reply	other threads:[~2007-08-03 12:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03  4:00 [PATCH 0/4][e2fsprogs] Enable FLEX_BG support Jose R. Santos
2007-08-03  4:00 ` [PATCH 1/4][e2fsprogs] Reserve the INCOMPAT feature number for FLEX_BG Jose R. Santos
2007-08-03  4:00 ` [PATCH 2/4][e2fsprogs] Allow FLEX_BG to be use as a feature option at mke2fs time Jose R. Santos
2007-08-03  4:00 ` [PATCH 3/4][e2fsprogs] Relax group descriptor checking Jose R. Santos
2007-08-03  5:24   ` Aneesh Kumar K.V
2007-08-03 12:17     ` Jose R. Santos
2007-08-03 18:22   ` Andreas Dilger
2007-08-03 20:05     ` Jose R. Santos
2007-08-03  4:01 ` [PATCH 4/4][e2fsprogs] New bitmap and inode table allocation for FLEX_BG Jose R. Santos
2007-08-03  6:31   ` Aneesh Kumar K.V
2007-08-03 12:27     ` Jose R. Santos [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-14  4:32 [PATCH 0/4][e2fsprogs] Enable FLEX_BG support Jose R. Santos
2007-08-14  4:33 ` [PATCH 4/4][e2fsprogs] New bitmap and inode table allocation for FLEX_BG Jose R. Santos
2007-11-04  0:52   ` Theodore Tso
2007-11-05 15:09     ` Jose R. Santos

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=20070803072723.3c8f2047@gara \
    --to=jrs@us.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).