if (!uuid_equal(&agfl->agfl_uuid, &mp->m_sb.sb_meta_uuid))
return __this_address;
- if (be32_to_cpu(agfl->agfl_magicnum) != XFS_AGFL_MAGIC)
+ if (agfl->agfl_magicnum != cpu_to_be32(XFS_AGFL_MAGIC))
return __this_address;
/*
* during growfs operations, the perag is not fully initialised,
if (xfs_sb_version_hascrc(&mp->m_sb)) {
struct xfs_da3_node_hdr *hdr3 = bp->b_addr;
- if (ichdr.magic != XFS_ATTR3_LEAF_MAGIC)
+ if (hdr3->info.hdr.magic != cpu_to_be16(XFS_ATTR3_LEAF_MAGIC))
return __this_address;
if (!uuid_equal(&hdr3->info.uuid, &mp->m_sb.sb_meta_uuid))
if (!xfs_log_check_lsn(mp, be64_to_cpu(hdr3->info.lsn)))
return __this_address;
} else {
- if (ichdr.magic != XFS_ATTR_LEAF_MAGIC)
+ if (leaf->hdr.info.magic != cpu_to_be16(XFS_ATTR_LEAF_MAGIC))
return __this_address;
}
/*
if (xfs_sb_version_hascrc(&mp->m_sb)) {
struct xfs_da3_node_hdr *hdr3 = bp->b_addr;
- if (ichdr.magic != XFS_DA3_NODE_MAGIC)
+ if (hdr3->info.hdr.magic != cpu_to_be16(XFS_DA3_NODE_MAGIC))
return __this_address;
if (!uuid_equal(&hdr3->info.uuid, &mp->m_sb.sb_meta_uuid))
if (!xfs_log_check_lsn(mp, be64_to_cpu(hdr3->info.lsn)))
return __this_address;
} else {
- if (ichdr.magic != XFS_DA_NODE_MAGIC)
+ if (hdr->hdr.info.magic != cpu_to_be16(XFS_DA_NODE_MAGIC))
return __this_address;
}
if (ichdr.level == 0)
};
const struct xfs_buf_ops xfs_inode_buf_ra_ops = {
- .name = "xxfs_inode_ra",
+ .name = "xfs_inode_ra",
.verify_read = xfs_inode_buf_readahead_verify,
.verify_write = xfs_inode_buf_write_verify,
};
struct xfs_buf *bp,
struct xfs_sb *sbp)
{
+ struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp);
uint32_t agcount = 0;
uint32_t rem;
- if (sbp->sb_magicnum != XFS_SB_MAGIC) {
+ if (dsb->sb_magicnum != cpu_to_be32(XFS_SB_MAGIC)) {
xfs_warn(mp, "bad magic number");
return -EWRONGFS;
}