Re: [RFC PATCH 09/17] Add progress bar for allocating block tables - takes forever on large

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 11, 2008  19:43 -0800, Valerie Aurora Henson wrote:
> +static errcode_t ext2fs_allocate_tables_with_progress(ext2_filsys fs)
> +{
> +	for (i = 0; i < fs->group_desc_count; i++) {
> +		progress_update(&progress, i);
> +		retval = ext2fs_allocate_group_table(fs, i, (ext2fs_block_bitmap64) fs->block_map);
> +		if (retval)
> +			return retval;
> +	}

Does it make sense to only update the progress periodically instead of for
every group?  Since this is a memory operation, I suspect the console
output slows it down noticably, and would spew a ton of garbage into
console logs and such.  Something like:

	for (i = 0; i < fs->group_desc_count; i++) {
		if (i & 256 == 255)
			progress_update(&progress, i);
		retval = ext2fs_allocate_group_table(fs, i, (ext2fs_block_bitmap64) fs->block_map);
		if (retval)
			return retval;
	}
	progress_close(&progress);


Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux