lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070803072723.3c8f2047@gara>
Date:	Fri, 3 Aug 2007 07:27:23 -0500
From:	"Jose R. Santos" <jrs@...ibm.com>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 4/4][e2fsprogs] New bitmap and inode table allocation
 for FLEX_BG

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

> 
> 
> Jose R. Santos wrote:
> > From: Jose R. Santos <jrs@...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
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ