ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/2] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl.
Date: Wed, 3 Nov 2010 18:18:41 -0700	[thread overview]
Message-ID: <20101104011839.GA14640@mail.oracle.com> (raw)
In-Reply-To: <1288782126-13007-1-git-send-email-tristan.ye@oracle.com>

On Wed, Nov 03, 2010 at 07:02:05PM +0800, Tristan Ye wrote:
> The new code is dedicated to calculate free inodes number of all inode_allocs,
> then return the info to userpace in terms of an array.
> 
> Specially, flag 'OCFS2_INFO_FL_NON_COHERENT', manipulated by '--cluster-coherent'
> from userspace, is now going to be involved. setting the flag on means no cluster
> coherency considered, usually, userspace tools choose none-coherency strategy by
> default for the sake of performace.

	This looks pretty straightforward.  Note that any non-cached
allocator is going to lock, regardless of the coherency flag.  Do we
want to use ocfs2_ilookup() instead?

> +int ocfs2_info_scan_inode_alloc(struct inode *inode_alloc,
> +				struct ocfs2_info_freeinode *fi, __u32 slot)
> +{
> +	int status = 0, unlock = 0;
> +
> +	struct buffer_head *bh = NULL;
> +	struct ocfs2_dinode *dinode_alloc = NULL;
> +
> +	mutex_lock(&inode_alloc->i_mutex);
> +
> +	if (!(fi->ifi_req.ir_flags & OCFS2_INFO_FL_NON_COHERENT)) {

	Also, I'm thinking that this would look much better as:

	if (!ocfs2_info_coherent(&fi->ifi_req)) {

That implies we probably also want ocfs2_info_set_filled(request), etc.
Good, bad?

Joel

-- 

The Graham Corollary:

	The longer a socially-moderated news website exists, the
	probability of an old Paul Graham link appearing at the top
	approaches certainty.

Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

  parent reply	other threads:[~2010-11-04  1:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 11:02 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl Tristan Ye
2010-11-03 11:02 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add a new code 'OCFS2_INFO_FREEFRAG' " Tristan Ye
2010-11-04  1:29   ` Joel Becker
2010-11-04  2:56     ` tristan
2010-11-04  4:47       ` tristan
2010-11-04  6:32       ` Joel Becker
2010-11-04  7:05         ` tristan
2010-12-07  0:46           ` Joel Becker
2010-11-04  1:18 ` Joel Becker [this message]
2010-11-04  2:27   ` [Ocfs2-devel] [PATCH 1/2] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' " tristan
2010-11-04  6:28     ` Joel Becker
2010-11-04  8:10       ` tristan
2010-11-04 21:24         ` Joel Becker

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=20101104011839.GA14640@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).