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: <20080327123855.GC10265@hash.localnet>
Date:	Thu, 27 Mar 2008 08:38:55 -0400
From:	Bob Copeland <me@...copeland.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/7] omfs: add inode routines

On Thu, Mar 27, 2008 at 07:13:50AM +0100, Andi Kleen wrote:
> Bob Copeland <me@...copeland.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 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ