From: Bob Copeland <me@bobcopeland.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/7] omfs: add inode routines
Date: Thu, 27 Mar 2008 08:38:55 -0400 [thread overview]
Message-ID: <20080327123855.GC10265@hash.localnet> (raw)
In-Reply-To: <87k5jon17l.fsf@basil.nowhere.org>
On Thu, Mar 27, 2008 at 07:13:50AM +0100, Andi Kleen wrote:
> Bob Copeland <me@bobcopeland.com> writes:
> > +
> > + bitmap_size = (sbi->s_num_blocks + 7) / 8;
> > + array_size = (bitmap_size + sb->s_blocksize - 1) / sb->s_blocksize;
> > +
> > + sbi->s_imap_size = array_size;
> > + sbi->s_imap = kzalloc(array_size * sizeof(unsigned long), GFP_KERNEL);
>
>
> If the array can be really 300k you should probably have a vmalloc fallback
> here.
bitmap_size will be 300k (20G / 8192 / 8), but array_size adds another
level of indirection so s_imap will be 300k/8192 segments, each of size
8192. Hmm, I guess that should be 'sizeof(unsigned long *)' above.
One might wonder why we keep it in memory anyway since we can read the
bitmap blocks on demand. The reason is that once the tree walk is added
for ReplayTV then it would use this same i_map. However, I've yet to
hear from interested RTV folks so it is currently read-only and there is
no tree walk for the bitmap.
--
Bob Copeland %% www.bobcopeland.com
next prev parent reply other threads:[~2008-03-27 12:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 0:45 [PATCH 2/7] omfs: add inode routines Bob Copeland
2008-03-27 6:13 ` Andi Kleen
2008-03-27 12:38 ` Bob Copeland [this message]
2008-03-28 3:42 ` Arnd Bergmann
2008-03-28 13:34 ` Bob Copeland
2008-03-28 20:20 ` Pavel Machek
2008-03-30 3:21 ` Bob Copeland
-- strict thread matches above, loose matches on Subject: below --
2008-04-12 22:58 Bob Copeland
2008-04-13 8:05 ` Christoph Hellwig
2008-04-13 9:17 ` Alan Cox
2008-04-15 18:03 ` Miklos Szeredi
2008-04-15 18:33 ` Bob Copeland
2008-04-15 18:30 ` Marcin Slusarz
2008-04-15 23:56 ` Bob Copeland
2008-04-16 18:31 ` Marcin Slusarz
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=20080327123855.GC10265@hash.localnet \
--to=me@bobcopeland.com \
--cc=andi@firstfloor.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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