mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[XFS] Always use struct xfs_btree_block instead of short / longform
structures. Always use the generic xfs_btree_block type instead of the short / long structures. Add XFS_BTREE_SBLOCK_LEN / XFS_BTREE_LBLOCK_LEN defines for the length of a short / long form block. The rationale for this is that we will grow more btree block header variants to support CRCs and other RAS information, and always accessing them through the same datatype with unions for the short / long form pointers makes implementing this much easier. SGI-PV: 988146 SGI-Modid: xfs-linux-melb:xfs-kern:32300a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Donald Douwsma <donaldd@sgi.com> Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
parent
136341b41a
commit
7cc95a821d
15 changed files with 165 additions and 187 deletions
|
@ -380,21 +380,20 @@ xfs_alloc_fixup_trees(
|
|||
return error;
|
||||
XFS_WANT_CORRUPTED_RETURN(i == 1);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
{
|
||||
xfs_alloc_block_t *bnoblock;
|
||||
xfs_alloc_block_t *cntblock;
|
||||
|
||||
if (bno_cur->bc_nlevels == 1 &&
|
||||
cnt_cur->bc_nlevels == 1) {
|
||||
bnoblock = XFS_BUF_TO_ALLOC_BLOCK(bno_cur->bc_bufs[0]);
|
||||
cntblock = XFS_BUF_TO_ALLOC_BLOCK(cnt_cur->bc_bufs[0]);
|
||||
XFS_WANT_CORRUPTED_RETURN(
|
||||
be16_to_cpu(bnoblock->bb_numrecs) ==
|
||||
be16_to_cpu(cntblock->bb_numrecs));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (bno_cur->bc_nlevels == 1 && cnt_cur->bc_nlevels == 1) {
|
||||
struct xfs_btree_block *bnoblock;
|
||||
struct xfs_btree_block *cntblock;
|
||||
|
||||
bnoblock = XFS_BUF_TO_BLOCK(bno_cur->bc_bufs[0]);
|
||||
cntblock = XFS_BUF_TO_BLOCK(cnt_cur->bc_bufs[0]);
|
||||
|
||||
XFS_WANT_CORRUPTED_RETURN(
|
||||
bnoblock->bb_numrecs == cntblock->bb_numrecs);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Deal with all four cases: the allocated record is contained
|
||||
* within the freespace record, so we can have new freespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue