ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: make ocfs2_adjust_resv_from_alloc simple.
Date: Thu, 08 Apr 2010 07:47:00 +0800	[thread overview]
Message-ID: <4BBD1974.9040203@oracle.com> (raw)
In-Reply-To: <20100407212423.GP11402@wotan.suse.de>

Mark Fasheh wrote:
> On Tue, Apr 06, 2010 at 03:40:32PM +0800, Tao Ma wrote:
>   
>> When we allocate some bits from the reservation, we always
>> allocate from the r_start(see ocfs2_resmap_resv_bits).
>> So there should be no sense for checking between r_start
>> and start. And I don't think we will change this behaviour
>> somehow later by allocating from some bits after r_start.
>> Why not make ocfs2_adjust_resv_from_alloc simple now?
>>     
>
> I wanted ocfs2_resmap_claimed_bits() to be able to accept as many types of
> input as possible. That way, it would stay ready to handle other types of
> bitmaps. You're correct however that it's not really practical to allow for
> allocation which would split our reservation.
>
> Btw, if we took this to it's logical conclusion I think we'd be able to get
> rid of the 'cstart' variable to ocfs2_resmap_claimed_bits(). It's good to at
> least track what the caller *thought* the start of the allocation was so
> IMHO we should leave that part of the api untouched.
>   
yeah, I just want to change your codes as less as possible. ;)
>
> Can you please add a comment in reservations.h that
> ocfs2_resmap_claimed_bits() expects that 'start' is the same as we passed
> back from ocfs2_resmap_resv_bits(). Also, there's a check at the top of
> ocfs2_resmap_claimed_bits() which can become:
>
> BUG_ON(cstart != resv->r_start);
>   
OK, I will add them and resend the patch.

Regards,
Tao

  reply	other threads:[~2010-04-07 23:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06  7:40 [Ocfs2-devel] [PATCH] ocfs2: make ocfs2_adjust_resv_from_alloc simple Tao Ma
2010-04-07 21:24 ` Mark Fasheh
2010-04-07 23:47   ` Tao Ma [this message]
2010-04-08  8:33   ` [Ocfs2-devel] [PATCH v2] " Tao Ma
2010-04-23 21:44     ` Mark Fasheh
2010-04-23 22:03     ` Joel Becker
2010-04-26  6:45       ` Tao Ma

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=4BBD1974.9040203@oracle.com \
    --to=tao.ma@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).