cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 5 of 5]Bz #248176: GFS2: invalid metadata block - TRY 3
@ 2007-07-25 15:06 Bob Peterson
  2007-07-25 15:14 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2007-07-25 15:06 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Okay, here is patch 5 again.  The difference between the patches that
applied and those that didn't seems to be that git-diff worked and my
normal diff didn't.  I used diff -pu to generate the "bad" patches,
which had always worked for me in the past, so I'm not sure why it
isn't now.  Perhaps someone can suggest additional parms to diff.
----------------------
This is patch 5 of 5 for bug #248176

Metadata corruption was occurring because page references weren't
being removed in all cases.  I previously added a function called
detach_bufdata, but I discovered there already WAS a function out
there to do the job.  It's called gfs2_meta_cache_flush.  So I added
a call to that to remove the page references.
Recently I had been thinking that this was entirely unnecessary, but
when I removed the code, the metadata corruption problem returned
immediately.
--
Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
--
 fs/gfs2/log.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index f7c0608..00ab6c0 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -219,6 +219,7 @@ static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
 {
 	struct list_head *head = &ai->ai_ail2_list;
 	struct gfs2_bufdata *bd;
+	struct gfs2_inode *bh_ip;
 
 	while (!list_empty(head)) {
 		bd = list_entry(head->prev, struct gfs2_bufdata,
@@ -228,6 +229,8 @@ static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
 		list_del(&bd->bd_ail_st_list);
 		list_del(&bd->bd_ail_gl_list);
 		atomic_dec(&bd->bd_gl->gl_ail_count);
+		bh_ip = GFS2_I(bd->bd_bh->b_page->mapping->host);
+		gfs2_meta_cache_flush(bh_ip);
 		brelse(bd->bd_bh);
 	}
 }




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH 5 of 5]Bz #248176: GFS2: invalid metadata block - TRY 3
  2007-07-25 15:06 [Cluster-devel] [PATCH 5 of 5]Bz #248176: GFS2: invalid metadata block - TRY 3 Bob Peterson
@ 2007-07-25 15:14 ` Steven Whitehouse
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2007-07-25 15:14 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Now in the -nmw git tree. Thanks,

Steve.

On Wed, 2007-07-25 at 10:06 -0500, Bob Peterson wrote:
> Okay, here is patch 5 again.  The difference between the patches that
> applied and those that didn't seems to be that git-diff worked and my
> normal diff didn't.  I used diff -pu to generate the "bad" patches,
> which had always worked for me in the past, so I'm not sure why it
> isn't now.  Perhaps someone can suggest additional parms to diff.
> ----------------------
> This is patch 5 of 5 for bug #248176
> 
> Metadata corruption was occurring because page references weren't
> being removed in all cases.  I previously added a function called
> detach_bufdata, but I discovered there already WAS a function out
> there to do the job.  It's called gfs2_meta_cache_flush.  So I added
> a call to that to remove the page references.
> Recently I had been thinking that this was entirely unnecessary, but
> when I removed the code, the metadata corruption problem returned
> immediately.
> --
> Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
> --
>  fs/gfs2/log.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
> index f7c0608..00ab6c0 100644
> --- a/fs/gfs2/log.c
> +++ b/fs/gfs2/log.c
> @@ -219,6 +219,7 @@ static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
>  {
>  	struct list_head *head = &ai->ai_ail2_list;
>  	struct gfs2_bufdata *bd;
> +	struct gfs2_inode *bh_ip;
>  
>  	while (!list_empty(head)) {
>  		bd = list_entry(head->prev, struct gfs2_bufdata,
> @@ -228,6 +229,8 @@ static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
>  		list_del(&bd->bd_ail_st_list);
>  		list_del(&bd->bd_ail_gl_list);
>  		atomic_dec(&bd->bd_gl->gl_ail_count);
> +		bh_ip = GFS2_I(bd->bd_bh->b_page->mapping->host);
> +		gfs2_meta_cache_flush(bh_ip);
>  		brelse(bd->bd_bh);
>  	}
>  }
> 
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-25 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 15:06 [Cluster-devel] [PATCH 5 of 5]Bz #248176: GFS2: invalid metadata block - TRY 3 Bob Peterson
2007-07-25 15:14 ` Steven Whitehouse

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).