From: Theodore Tso <tytso@mit.edu>
To: Girish Shilamkar <girish@clusterfs.com>
Cc: Ext4 Mailing List <linux-ext4@vger.kernel.org>,
Andreas Dilger <adilger@clusterfs.com>
Subject: Re: [Patch 7/13] Many inodes in filesystem.
Date: Tue, 24 Jul 2007 10:35:33 -0400 [thread overview]
Message-ID: <20070724143533.GC11826@thunk.org> (raw)
In-Reply-To: <1185275099.3789.72.camel@dhcp4.linsyssoft.com>
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@clusterfs.com>
> Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
> Signed-off-by: Kalpak Shah <kalpak@clusterfs.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) {
>
>
prev parent reply other threads:[~2007-07-24 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 11:04 [Patch 7/13] Many inodes in filesystem Girish Shilamkar
2007-07-24 14:35 ` Theodore Tso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070724143533.GC11826@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@clusterfs.com \
--cc=girish@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).