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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 24 Jul 2007 10:35:33 -0400
From:	Theodore Tso <tytso@....edu>
To:	Girish Shilamkar <girish@...sterfs.com>
Cc:	Ext4 Mailing List <linux-ext4@...r.kernel.org>,
	Andreas Dilger <adilger@...sterfs.com>
Subject: Re: [Patch 7/13]  Many inodes in filesystem.

On Tue, Jul 24, 2007 at 04:34:59PM +0530, Girish Shilamkar wrote:
> Handle filesystems with many hard links that have more than ~700M inodes.
> The float variable lacks precision at this scale.

This was fixed in e2fsprogs mainline a slightly different way.  Just
above it:

				range = ((float) (ino - lowval)) /
					(highval - lowval);
				if (range > 0.9)
					range = 0.9;
				if (range < 0.1)
					range = 0.1;

The problem with just correcting the midpoint calculation as you
proposed in your patch is that you could end up doing a linear search
through the whole array in some really abberrant cases.  With this fix
applied in e2fsprogs, the patch below isn't required.

Regards,

					- Ted

> Signed-off-by: Andreas Dilger <adilger@...sterfs.com>
> Signed-off-by: Girish Shilamkar <girish@...sterfs.com>
> Signed-off-by: Kalpak Shah <kalpak@...sterfs.com>
> 
> Index: e2fsprogs-1.40.1/lib/ext2fs/icount.c
> ===================================================================
> --- e2fsprogs-1.40.1.orig/lib/ext2fs/icount.c
> +++ e2fsprogs-1.40.1/lib/ext2fs/icount.c
> @@ -376,6 +376,10 @@ static struct ext2_icount_el *get_icount
>  					range = 0.1;
>  			}
>  			mid = low + ((int) (range * (high-low)));
> +			if (mid > high)
> +				mid = high;
> +			if (mid < low)
> +				mid = low;
>  		}
>  #endif
>  		if (ino == icount->list[mid].ino) {
> 
> 
-
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