All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] Fix for online resize with metaecc
@ 2010-04-01  1:30 Joel Becker
  2010-04-01  1:34 ` Mark Fasheh
  2010-04-01  2:02 ` Tao Ma
  0 siblings, 2 replies; 3+ messages in thread
From: Joel Becker @ 2010-04-01  1:30 UTC (permalink / raw)
  To: ocfs2-devel

Mark figured out what happened with bug 1214 - online resize writes out
the superblocks without calculating metaecc.  Here's a patch to fix it.

Tao, Tiger, Tristan... Can one of you test this quickly?

Joel

From d917c07dd45b16827a207e90a145ae248416c96c Mon Sep 17 00:00:00 2001
From: Joel Becker <joel.becker@oracle.com>
Date: Wed, 31 Mar 2010 18:25:44 -0700
Subject: [PATCH] ocfs2: Compute metaecc for superblocks during online resize.

Online resize writes out the new superblock and its backups directly.
The metaecc data wasn't being recomputed.  Let's do that directly.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Cc: stable at kernel.org
---
 fs/ocfs2/buffer_head_io.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
index 21c808f..b18c6d6 100644
--- a/fs/ocfs2/buffer_head_io.c
+++ b/fs/ocfs2/buffer_head_io.c
@@ -407,6 +407,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,
 				struct buffer_head *bh)
 {
 	int ret = 0;
+	struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data;
 
 	mlog_entry_void();
 
@@ -426,6 +427,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,
 
 	get_bh(bh); /* for end_buffer_write_sync() */
 	bh->b_end_io = end_buffer_write_sync;
+	ocfs2_compute_meta_ecc(osb->sb, bh->b_data, &di->i_check);
 	submit_bh(WRITE, bh);
 
 	wait_on_buffer(bh);
-- 
1.7.0.3


-- 

Life's Little Instruction Book #396

	"Never give anyone a fruitcake."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

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

* [Ocfs2-devel] Fix for online resize with metaecc
  2010-04-01  1:30 [Ocfs2-devel] Fix for online resize with metaecc Joel Becker
@ 2010-04-01  1:34 ` Mark Fasheh
  2010-04-01  2:02 ` Tao Ma
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Fasheh @ 2010-04-01  1:34 UTC (permalink / raw)
  To: ocfs2-devel

On Wed, Mar 31, 2010 at 06:30:21PM -0700, Joel Becker wrote:
> Mark figured out what happened with bug 1214 - online resize writes out
> the superblocks without calculating metaecc.  Here's a patch to fix it.
> 
> Tao, Tiger, Tristan... Can one of you test this quickly?

You can add my ack: Acked-by: Mark Fasheh <mfasheh@suse.com>

--
Mark Fasheh

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

* [Ocfs2-devel] Fix for online resize with metaecc
  2010-04-01  1:30 [Ocfs2-devel] Fix for online resize with metaecc Joel Becker
  2010-04-01  1:34 ` Mark Fasheh
@ 2010-04-01  2:02 ` Tao Ma
  1 sibling, 0 replies; 3+ messages in thread
From: Tao Ma @ 2010-04-01  2:02 UTC (permalink / raw)
  To: ocfs2-devel



Joel Becker wrote:
> Mark figured out what happened with bug 1214 - online resize writes out
> the superblocks without calculating metaecc.  Here's a patch to fix it.
> 
> Tao, Tiger, Tristan... Can one of you test this quickly?
Tested-by: Tao Ma <tao.ma@oracle.com>
> 
> Joel
> 
>>From d917c07dd45b16827a207e90a145ae248416c96c Mon Sep 17 00:00:00 2001
> From: Joel Becker <joel.becker@oracle.com>
> Date: Wed, 31 Mar 2010 18:25:44 -0700
> Subject: [PATCH] ocfs2: Compute metaecc for superblocks during online resize.
> 
> Online resize writes out the new superblock and its backups directly.
> The metaecc data wasn't being recomputed.  Let's do that directly.
> 
> Signed-off-by: Joel Becker <joel.becker@oracle.com>
> Cc: stable at kernel.org
> ---
>  fs/ocfs2/buffer_head_io.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
> index 21c808f..b18c6d6 100644
> --- a/fs/ocfs2/buffer_head_io.c
> +++ b/fs/ocfs2/buffer_head_io.c
> @@ -407,6 +407,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,
>  				struct buffer_head *bh)
>  {
>  	int ret = 0;
> +	struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data;
>  
>  	mlog_entry_void();
>  
> @@ -426,6 +427,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,
>  
>  	get_bh(bh); /* for end_buffer_write_sync() */
>  	bh->b_end_io = end_buffer_write_sync;
> +	ocfs2_compute_meta_ecc(osb->sb, bh->b_data, &di->i_check);
>  	submit_bh(WRITE, bh);
>  
>  	wait_on_buffer(bh);

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

end of thread, other threads:[~2010-04-01  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01  1:30 [Ocfs2-devel] Fix for online resize with metaecc Joel Becker
2010-04-01  1:34 ` Mark Fasheh
2010-04-01  2:02 ` Tao Ma

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.