diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-30 15:46:23 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-30 15:46:23 -0500 |
commit | e3167ded1f1b16424bc14d5673cdc5414f179970 (patch) | |
tree | 1b995e6387b230b1f447aabe30b689d091ee0b52 /fs/gfs2/lops.c | |
parent | cd45697f0ddbb58f3f83c29fe164713ee7765e21 (diff) |
[GFS] Fix bug in endian conversion for metadata header
In some cases 16 bit functions were being used rather than 32 bit
functions.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r-- | fs/gfs2/lops.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 9d40e21f6ead..689c9101c0fb 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -133,8 +133,8 @@ static void buf_lo_before_commit(struct gfs2_sbd *sdp) | |||
133 | ld = (struct gfs2_log_descriptor *)bh->b_data; | 133 | ld = (struct gfs2_log_descriptor *)bh->b_data; |
134 | ptr = (__be64 *)(bh->b_data + offset); | 134 | ptr = (__be64 *)(bh->b_data + offset); |
135 | ld->ld_header.mh_magic = cpu_to_be32(GFS2_MAGIC); | 135 | ld->ld_header.mh_magic = cpu_to_be32(GFS2_MAGIC); |
136 | ld->ld_header.mh_type = cpu_to_be16(GFS2_METATYPE_LD); | 136 | ld->ld_header.mh_type = cpu_to_be32(GFS2_METATYPE_LD); |
137 | ld->ld_header.mh_format = cpu_to_be16(GFS2_FORMAT_LD); | 137 | ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD); |
138 | ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_METADATA); | 138 | ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_METADATA); |
139 | ld->ld_length = cpu_to_be32(num + 1); | 139 | ld->ld_length = cpu_to_be32(num + 1); |
140 | ld->ld_data1 = cpu_to_be32(num); | 140 | ld->ld_data1 = cpu_to_be32(num); |
@@ -291,8 +291,8 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) | |||
291 | bh = gfs2_log_get_buf(sdp); | 291 | bh = gfs2_log_get_buf(sdp); |
292 | ld = (struct gfs2_log_descriptor *)bh->b_data; | 292 | ld = (struct gfs2_log_descriptor *)bh->b_data; |
293 | ld->ld_header.mh_magic = cpu_to_be32(GFS2_MAGIC); | 293 | ld->ld_header.mh_magic = cpu_to_be32(GFS2_MAGIC); |
294 | ld->ld_header.mh_type = cpu_to_be16(GFS2_METATYPE_LD); | 294 | ld->ld_header.mh_type = cpu_to_be32(GFS2_METATYPE_LD); |
295 | ld->ld_header.mh_format = cpu_to_be16(GFS2_FORMAT_LD); | 295 | ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD); |
296 | ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_REVOKE); | 296 | ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_REVOKE); |
297 | ld->ld_length = cpu_to_be32(gfs2_struct2blk(sdp, sdp->sd_log_num_revoke, | 297 | ld->ld_length = cpu_to_be32(gfs2_struct2blk(sdp, sdp->sd_log_num_revoke, |
298 | sizeof(uint64_t))); | 298 | sizeof(uint64_t))); |
@@ -313,8 +313,8 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) | |||
313 | bh = gfs2_log_get_buf(sdp); | 313 | bh = gfs2_log_get_buf(sdp); |
314 | mh = (struct gfs2_meta_header *)bh->b_data; | 314 | mh = (struct gfs2_meta_header *)bh->b_data; |
315 | mh->mh_magic = cpu_to_be32(GFS2_MAGIC); | 315 | mh->mh_magic = cpu_to_be32(GFS2_MAGIC); |
316 | mh->mh_type = cpu_to_be16(GFS2_METATYPE_LB); | 316 | mh->mh_type = cpu_to_be32(GFS2_METATYPE_LB); |
317 | mh->mh_format = cpu_to_be16(GFS2_FORMAT_LB); | 317 | mh->mh_format = cpu_to_be32(GFS2_FORMAT_LB); |
318 | offset = sizeof(struct gfs2_meta_header); | 318 | offset = sizeof(struct gfs2_meta_header); |
319 | } | 319 | } |
320 | 320 | ||
@@ -576,9 +576,9 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) | |||
576 | ld->ld_header.mh_magic = | 576 | ld->ld_header.mh_magic = |
577 | cpu_to_be32(GFS2_MAGIC); | 577 | cpu_to_be32(GFS2_MAGIC); |
578 | ld->ld_header.mh_type = | 578 | ld->ld_header.mh_type = |
579 | cpu_to_be16(GFS2_METATYPE_LD); | 579 | cpu_to_be32(GFS2_METATYPE_LD); |
580 | ld->ld_header.mh_format = | 580 | ld->ld_header.mh_format = |
581 | cpu_to_be16(GFS2_FORMAT_LD); | 581 | cpu_to_be32(GFS2_FORMAT_LD); |
582 | ld->ld_type = | 582 | ld->ld_type = |
583 | cpu_to_be32(GFS2_LOG_DESC_JDATA); | 583 | cpu_to_be32(GFS2_LOG_DESC_JDATA); |
584 | ld->ld_length = cpu_to_be32(num + 1); | 584 | ld->ld_length = cpu_to_be32(num + 1); |