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 4 of 5]Bz #248176: GFS2: invalid metadata block - RESEND
Date: Wed, 25 Jul 2007 10:49:02 +0100	[thread overview]
Message-ID: <1185356942.8765.458.camel@quoit> (raw)
In-Reply-To: <1185304275.517.113.camel@technetium.msp.redhat.com>

Hi,

I've pushed patches 1-3, patches 4 & 5 don't apply. It looks like a path
problem. You need to generate the patches so that they can be applied
with patch -p1 from the top level of the source tree (so the best way is
by being one level up from that when you run diff),

Steve.

On Tue, 2007-07-24 at 14:11 -0500, Bob Peterson wrote:
> This is patch 4 of 5 for bug #248176.
> 
> There was metadata corruption caused because the clone bitmaps weren't
> being kept in sync with the regular bitmaps in some cases.
> Code was added to keep them in sync.
> --
> Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
> --
> --- rgrp.patch3.c	2007-07-24 12:08:36.000000000 -0500
> +++ rgrp.patch4.c	2007-07-24 12:29:07.000000000 -0500
> @@ -54,6 +54,7 @@ static const char valid_change[16] = {
>  
>  static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal,
>                          unsigned char old_state, unsigned char new_state);
> +void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd);
>  
>  /**
>   * gfs2_setbit - Set a bit in the bitmaps
> @@ -727,6 +728,9 @@ int gfs2_rgrp_bh_get(struct gfs2_rgrpd *
>  	if (rgd->rd_rg_vn != gl->gl_vn) {
>  		gfs2_rgrp_in(&rgd->rd_rg, (rgd->rd_bits[0].bi_bh)->b_data);
>  		rgd->rd_rg_vn = gl->gl_vn;
> +		bi = rgd->rd_bits + x;
> +		if (bi->bi_clone)
> +			gfs2_rgrp_repolish_clones(rgd);
>  	}
>  
>  	spin_lock(&sdp->sd_rindex_spin);
> @@ -1374,6 +1378,8 @@ static struct gfs2_rgrpd *rgblk_free(str
>  		gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1);
>  		gfs2_setbit(rgd, bi->bi_bh->b_data + bi->bi_offset,
>  			    bi->bi_len, buf_blk, new_state);
> +		gfs2_setbit(rgd, bi->bi_clone + bi->bi_offset,
> +			    bi->bi_len, buf_blk, new_state);
>  	}
>  
>  	return rgd;
> @@ -1530,6 +1536,9 @@ void gfs2_free_data(struct gfs2_inode *i
>  		return;
>  
>  	rgd->rd_rg.rg_free += blen;
> +	spin_lock(&sdp->sd_rindex_spin);
> +	rgd->rd_free_clone += blen;
> +	spin_unlock(&sdp->sd_rindex_spin);
>  
>  	gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1);
>  	gfs2_rgrp_out(&rgd->rd_rg, rgd->rd_bits[0].bi_bh->b_data);
> @@ -1558,6 +1567,9 @@ void gfs2_free_meta(struct gfs2_inode *i
>  		return;
>  
>  	rgd->rd_rg.rg_free += blen;
> +	spin_lock(&sdp->sd_rindex_spin);
> +	rgd->rd_free_clone += blen;
> +	spin_unlock(&sdp->sd_rindex_spin);
>  
>  	gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1);
>  	gfs2_rgrp_out(&rgd->rd_rg, rgd->rd_bits[0].bi_bh->b_data);
> @@ -1598,6 +1610,9 @@ static void gfs2_free_uninit_di(struct g
>  		gfs2_consist_rgrpd(rgd);
>  	rgd->rd_rg.rg_dinodes--;
>  	rgd->rd_rg.rg_free++;
> +	spin_lock(&sdp->sd_rindex_spin);
> +	rgd->rd_free_clone++;
> +	spin_unlock(&sdp->sd_rindex_spin);
>  
>  	gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1);
>  	gfs2_rgrp_out(&rgd->rd_rg, rgd->rd_bits[0].bi_bh->b_data);
> 
> 



      reply	other threads:[~2007-07-25  9:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24 19:11 [Cluster-devel] [PATCH 4 of 5]Bz #248176: GFS2: invalid metadata block - RESEND Bob Peterson
2007-07-25  9:49 ` 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=1185356942.8765.458.camel@quoit \
    --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).