Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43252
b: refs/heads/master
c: 2a2c982
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Nov 30, 2006
1 parent 4b939c2 commit cee4019
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 551676226163379c217e8ec54bd287eab9b8521e
refs/heads/master: 2a2c98247b822db8df037a56c27201f9d716ac66
9 changes: 5 additions & 4 deletions trunk/fs/gfs2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,19 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
{
struct buffer_head *bh;
struct gfs2_log_header_host lh;
static const u32 nothing = 0;
u32 hash;
int error;

error = gfs2_replay_read_block(jd, blk, &bh);
if (error)
return error;

memcpy(&lh, bh->b_data, sizeof(struct gfs2_log_header)); /* XXX */
lh.lh_hash = 0;
hash = gfs2_disk_hash((char *)&lh, sizeof(struct gfs2_log_header));
hash = crc32_le((u32)~0, bh->b_data, sizeof(struct gfs2_log_header) -
sizeof(u32));
hash = crc32_le(hash, (unsigned char const *)&nothing, sizeof(nothing));
hash ^= (u32)~0;
gfs2_log_header_in(&lh, bh->b_data);

brelse(bh);

if (lh.lh_header.mh_magic != GFS2_MAGIC ||
Expand Down

0 comments on commit cee4019

Please sign in to comment.