FreeBSD/sbin/growfs/growfs.c
/*
 * This updates most parameters and the bitmap related to cluster. We have to
 * assume that sblock, osblock, acg are set up.
 */
This updates most parameters and the bitmap related to cluster. We have to
assume that sblock, osblock, acg are set up.
This updates most parameters and the bitmap related to cluster . We have to assume that sblock osblock acg are set up .
static void
updclst(int block)
{
	DBG_FUNC("updclst")
	static int lcs = 0;
	DBG_ENTER;
	if (sblock.fs_contigsumsize < 1) 
		return;
	setbit(cg_clustersfree(&acg), block);
	if (!lcs) {
		for (block--; lcs < sblock.fs_contigsumsize; block--, lcs++ ) {
			if (isclr(cg_clustersfree(&acg), block))
				break;
		}
	}
	if (lcs < sblock.fs_contigsumsize) {
		if (lcs)
			cg_clustersum(&acg)[lcs]--;
		lcs++;
		cg_clustersum(&acg)[lcs]++;
	}
	DBG_LEAVE;
	return;
}
static void updclst ( int block ) { DBG_FUNC ( " " ) static int lcs = 0 ; DBG_ENTER ; if ( sblock . fs_contigsumsize < 1 ) return ; setbit ( cg_clustersfree ( & acg ) , block ) ; if ( ! lcs ) { for ( block -- ; lcs < sblock . fs_contigsumsize ; block -- , lcs ++ ) { if ( isclr ( cg_clustersfree ( & acg ) , block ) ) break ; } } if ( lcs < sblock . fs_contigsumsize ) { if ( lcs ) cg_clustersum ( & acg ) [ lcs ] -- ; lcs ++ ; cg_clustersum ( & acg ) [ lcs ] ++ ; } DBG_LEAVE ; return ; }
This updates most parameters and the bitmap related to cluster.
This updates most parameters and the bitmap related to cluster .
/* no clustering */ /*
	 * update cluster allocation map
	 */ /*
	 * update cluster summary table
	 */ /*
		 * calculate size for the trailing cluster
		 */