Skip to content

Commit

Permalink
ocfs2: Compute metaecc for superblocks during online resize.
Browse files Browse the repository at this point in the history
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>
Acked-by: Mark Fasheh <mfasheh@suse.com>[
Cc: stable@kernel.org
  • Loading branch information
Joel Becker committed Apr 1, 2010
1 parent 428257f commit a42ab8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ocfs2/buffer_head_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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);
Expand Down

0 comments on commit a42ab8e

Please sign in to comment.