From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] ocfs2: Local alloc window size changeable via mount option
Date: Thu Dec 20 17:16:28 2007 [thread overview]
Message-ID: <20071221011507.GD8203@mail.oracle.com> (raw)
In-Reply-To: <1198191491-14441-2-git-send-email-sunil.mushran@oracle.com>
On Thu, Dec 20, 2007 at 02:58:11PM -0800, Sunil Mushran wrote:
> static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb)
> {
> - BUG_ON(osb->s_clustersize_bits < 12);
> + BUG_ON(osb->s_clustersize_bits > 20);
>
> - return 2048 >> (osb->s_clustersize_bits - 12);
> + return osb->local_alloc_size << (20 - osb->s_clustersize_bits);
> }
Can we document the magic bit numbers somehow? I don't think we
need super-awesome defines or anything, just "20 is 1MB, we're
calculating local_alloc_size in MB" or something like that.
Joel
--
"I always thought the hardest questions were those I could not answer.
Now I know they are the ones I can never ask."
- Charlie Watkins
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2007-12-20 17:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 14:59 [Ocfs2-devel] ocfs2: mount option localalloc Sunil Mushran
2007-12-20 14:58 ` [Ocfs2-devel] [PATCH 1/1] ocfs2: Local alloc window size changeable via mount option Sunil Mushran
2007-12-20 17:16 ` Joel Becker [this message]
2007-12-20 18:56 ` Mark Fasheh
-- strict thread matches above, loose matches on Subject: below --
2007-11-30 16:00 [Ocfs2-devel] " Sunil Mushran
2007-11-30 15:59 ` [Ocfs2-devel] [PATCH 1/1] " Sunil Mushran
2007-12-10 13:39 ` Mark Fasheh
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=20071221011507.GD8203@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/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.