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 Thu, Nov 13, 2008 at 12:54:50PM -0700, Andreas Dilger wrote:
> 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);

Heh, I just assumed progress already did that.  How about making the
unit of progress proportional to the total number of tables?  Say,
update progress every thousandth.

Also, this is kind of obnoxious - I just cut and paste
ext2fs_allocate_tables() from its original home because the progress
routines aren't exported.  It may be smarter to export them (for
internal use only) and put the progress into ext2fs_allocate_tables().

-VAL
--
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