From: Paul Clements <paul.clements@steeleye.com>
To: Francois Barre <francois.barre@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Raid5 bitmap - Bug in bitmap_startwrite()
Date: Fri, 04 Aug 2006 10:20:49 -0400 [thread overview]
Message-ID: <44D357C1.4090006@steeleye.com> (raw)
In-Reply-To: <fd8d0180608040205i5db2453flaf797ae506f823a6@mail.gmail.com>
Francois Barre wrote:
> Final question, I do not fully understand the bitmap_get_counter()
> function, especially comparing the 'hijacked' version (lines
> 1126-11127) :
> return &((bitmap_counter_t *) &bitmap->bp[page].map)[hi];
>
> and the 'normal' version (lines 1131-1132)
> return (bitmap_counter_t *) &(bitmap->bp[page].map[pageoff]);
>
> The hijacked version uses a 16-bit bitmap_counter_t*
> 'bitmap->bp[page].map' table with the hi index, whereas the normal
> uses a 8-bit char* 'bitmap->bp[page].map' table with the pageoff
> index.
>
> This may be the 'hijacked' logic, but I'm a little puzzled here.
Yes. When we fail to allocate a page for the map (which should be rare),
we, instead of failing the whole operation, just use the pointer to page
, so we're basically using 4 bytes (the page pointer itself) instead of
4K (the page) for that part of the bitmap. So each bit represents more
data (1000x more in the case of x86).
--
Paul
next prev parent reply other threads:[~2006-08-04 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 9:05 Raid5 bitmap - Bug in bitmap_startwrite() Francois Barre
2006-08-04 14:20 ` Paul Clements [this message]
2006-08-04 16:46 ` Francois Barre
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=44D357C1.4090006@steeleye.com \
--to=paul.clements@steeleye.com \
--cc=francois.barre@gmail.com \
--cc=linux-raid@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.