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: <20081114024514.GE20637@shell>
Date:	Thu, 13 Nov 2008 21:45:14 -0500
From:	Valerie Aurora Henson <vaurora@...hat.com>
To:	Andreas Dilger <adilger@....com>
Cc:	linux-ext4@...r.kernel.org, Theodore Tso <tytso@....edu>
Subject: Re: [RFC PATCH 09/17] Add progress bar for allocating block tables	- takes forever on large

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@...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