All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sunil Mushran <Sunil.Mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/3] Add ac_alloc_slot in	ocfs2_alloc_context.V3
Date: Mon Mar  3 18:25:38 2008	[thread overview]
Message-ID: <47CCB31E.2070802@oracle.com> (raw)
In-Reply-To: <20080303091230.GA18126@tma-pc1.cn.oracle.com>

Tao Ma wrote:
> In inode stealing, we no longer restrict the allocation to
> happen in the local node. So it is neccessary for us to add
> a new member in ocfs2_alloc_context to indicate which slot
> we are using for allocation. We also modify the process of
> local alloc so that this member can be used there also.
>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
>   

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>

> ---
>  fs/ocfs2/localalloc.c |    2 ++
>  fs/ocfs2/suballoc.c   |    1 +
>  fs/ocfs2/suballoc.h   |    1 +
>  3 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
> index add1ffd..80d1c75 100644
> --- a/fs/ocfs2/localalloc.c
> +++ b/fs/ocfs2/localalloc.c
> @@ -526,6 +526,8 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
>  	}
>  
>  	ac->ac_inode = local_alloc_inode;
> +	/* We should never use localalloc from another slot */
> +	ac->ac_alloc_slot = osb->slot_num;
>  	ac->ac_which = OCFS2_AC_USE_LOCAL;
>  	get_bh(osb->local_alloc_bh);
>  	ac->ac_bh = osb->local_alloc_bh;
> diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
> index 3be4e73..33d5573 100644
> --- a/fs/ocfs2/suballoc.c
> +++ b/fs/ocfs2/suballoc.c
> @@ -424,6 +424,7 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
>  	}
>  
>  	ac->ac_inode = alloc_inode;
> +	ac->ac_alloc_slot = slot;
>  
>  	fe = (struct ocfs2_dinode *) bh->b_data;
>  	if (!OCFS2_IS_VALID_DINODE(fe)) {
> diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h
> index 8799033..544c600 100644
> --- a/fs/ocfs2/suballoc.h
> +++ b/fs/ocfs2/suballoc.h
> @@ -36,6 +36,7 @@ typedef int (group_search_t)(struct inode *,
>  struct ocfs2_alloc_context {
>  	struct inode *ac_inode;    /* which bitmap are we allocating from? */
>  	struct buffer_head *ac_bh; /* file entry bh */
> +	u32    ac_alloc_slot;   /* which slot are we allocating from? */
>  	u32    ac_bits_wanted;
>  	u32    ac_bits_given;
>  #define OCFS2_AC_USE_LOCAL 1
>   

  reply	other threads:[~2008-03-03 18:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03  1:00 [Ocfs2-devel] [PATCH 0/3] Add inode stealing in ocfs2.V3 Tao Ma
2008-03-03  1:13 ` [Ocfs2-devel] [PATCH 1/3] Add a new parameter for ocfs2_reserve_suballoc_bits.V3 Tao Ma
2008-03-03 18:32   ` Sunil Mushran
2008-03-03  1:13 ` [Ocfs2-devel] [PATCH 2/3] Add ac_alloc_slot in ocfs2_alloc_context.V3 Tao Ma
2008-03-03 18:25   ` Sunil Mushran [this message]
2008-03-03  1:13 ` [Ocfs2-devel] [PATCH 3/3] Add inode stealing for ocfs2_reserve_new_inode.V3 Tao Ma
2008-03-03 18:25   ` Sunil Mushran
2008-03-03 18:47     ` Tao Ma
2008-03-03 18:57       ` Sunil Mushran
2008-03-03 19:21         ` Tao Ma
2008-03-04  0:55     ` [Ocfs2-devel] [PATCH 3/3] Add inode stealing for ocfs2_reserve_new_inode.V4 Tao Ma
2008-03-04 16:48       ` Mark Fasheh
2008-03-05  0:13         ` [Ocfs2-devel] [PATCH 3/3] Add inode stealing for ocfs2_reserve_new_inode.V5 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=47CCB31E.2070802@oracle.com \
    --to=sunil.mushran@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.