From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] ocfs2: add extent block stealing for ocfs2
Date: Thu, 21 Jan 2010 18:33:23 -0800 [thread overview]
Message-ID: <20100122023323.GC23568@mail.oracle.com> (raw)
In-Reply-To: <4B5909A5.30602@oracle.com>
On Thu, Jan 21, 2010 at 06:12:53PM -0800, Sunil Mushran wrote:
>
> The get and set routines are a bit convoluted. I agree with the hiding
> of the
> type by adding ocfs2_steal_meta() and ocfs2_steal_inode(). But the get/set
> routines will be better off just accepting the type.
>
> Right now the flow is:
>
> ocfs2_steal_resource()
> + if (type == INODE_ALLOC_SYSTEM_INODE)
> + ocfs2_set_inode_steal_slot(osb, slot);
>
> ocfs2_set_inode_steal_slot()
> + return ocfs2_set_steal_slot(osb, slot, INODE_ALLOC_SYSTEM_INODE);
>
> ocfs2_set_steal_slot()
> + if (type == INODE_ALLOC_SYSTEM_INODE)
> + osb->s_inode_steal_slot = slot;
I see your point. First, most of the slot stealing functions
don't belong in the header at all. They're only used in suballoc.c, so
make them static there.
The set routine is only called from ocfs2_steal_resource(). It
should take the type, because the type is already there. The get
routines are called from other places.
ocfs2_steal_resource() should call __ocfs2_set_steal_slot()
directly. No need for ocfs2_set_{inode,meta}_steal_slot(). Those
should be removed. ocfs2_steal_resource() should call
__ocfs2_get_steal_slot() directly to pass the type. The other callers
of ocfs2_get_{inode,meta}_steal_slot() remain the same.
Joel
--
Life's Little Instruction Book #347
"Never waste the oppourtunity to tell someone you love them."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2010-01-22 2:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 9:42 [Ocfs2-devel] [PATCH 1/1] ocfs2: add extent block stealing for ocfs2 Tiger Yang
2010-01-22 1:43 ` Joel Becker
2010-01-22 2:12 ` Sunil Mushran
2010-01-22 2:33 ` Joel Becker [this message]
2010-01-22 2:50 ` Tao Ma
-- strict thread matches above, loose matches on Subject: below --
2010-01-16 9:45 Tiger Yang
2010-01-18 9:17 ` Tiger Yang
2010-01-20 22:43 ` Joel Becker
2010-01-21 11:46 ` Tiger Yang
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=20100122023323.GC23568@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.