cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] GFS2: drop rindex glock to refresh rindex list
Date: Wed, 11 Nov 2009 10:06:26 +0000	[thread overview]
Message-ID: <1257933986.2718.7.camel@localhost.localdomain> (raw)
In-Reply-To: <20091110185456.GC6831@ether.msp.redhat.com>

Hi,

Now in the -nmw git tree. Thanks,

Steve.

On Tue, 2009-11-10 at 12:54 -0600, Benjamin Marzinski wrote:
> When a gfs2 filesystem is grown, it needs to rebuild the rindex list to be able
> to use the new space.  gfs2 does this when the rindex is marked not uptodate,
> which happens when the rindex glock is dropped.  However, on a single node
> setup, there is never any reason to drop the rindex glock, so gfs2 never
> invalidates the the rindex. This patch makes gfs2 automatically drop the
> rindex glock after filesystem grows, so it can refresh the rindex list.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
>  fs/gfs2/aops.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> Index: gfs2-2.6-nmw/fs/gfs2/aops.c
> ===================================================================
> --- gfs2-2.6-nmw.orig/fs/gfs2/aops.c
> +++ gfs2-2.6-nmw/fs/gfs2/aops.c
> @@ -819,8 +819,10 @@ static int gfs2_stuffed_write_end(struct
>  		mark_inode_dirty(inode);
>  	}
>  
> -	if (inode == sdp->sd_rindex)
> +	if (inode == sdp->sd_rindex) {
>  		adjust_fs_space(inode);
> +		ip->i_gh.gh_flags |= GL_NOCACHE;
> +	}
>  
>  	brelse(dibh);
>  	gfs2_trans_end(sdp);
> @@ -889,8 +891,10 @@ static int gfs2_write_end(struct file *f
>  		mark_inode_dirty(inode);
>  	}
>  
> -	if (inode == sdp->sd_rindex)
> +	if (inode == sdp->sd_rindex) {
>  		adjust_fs_space(inode);
> +		ip->i_gh.gh_flags |= GL_NOCACHE;
> +	}
>  
>  	brelse(dibh);
>  	gfs2_trans_end(sdp);
> 



      reply	other threads:[~2009-11-11 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 18:54 [Cluster-devel] [PATCH] GFS2: drop rindex glock to refresh rindex list Benjamin Marzinski
2009-11-11 10:06 ` Steven Whitehouse [this message]

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=1257933986.2718.7.camel@localhost.localdomain \
    --to=swhiteho@redhat.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).