Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23133
b: refs/heads/master
c: 70e73f5
h: refs/heads/master
i:
  23131: 7084849
v: v3
  • Loading branch information
Nathan Scott committed Mar 17, 2006
1 parent 9167102 commit f263104
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 94 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: 9cea236492ebabb9545564eb039aa0f477a05c96
refs/heads/master: 70e73f59755867383edf563d5a5cbea614c0fd49
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_da_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,7 @@ xfs_da_do_buf(
data = rbp->data;
free = rbp->data;
magic = INT_GET(info->magic, ARCH_CONVERT);
magic1 = INT_GET(data->hdr.magic, ARCH_CONVERT);
magic1 = be32_to_cpu(data->hdr.magic);
if (unlikely(
XFS_TEST_ERROR((magic != XFS_DA_NODE_MAGIC) &&
(magic != XFS_DIR_LEAF_MAGIC) &&
Expand Down
19 changes: 9 additions & 10 deletions trunk/fs/xfs/xfs_dir2_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ xfs_dir2_block_addname(
/*
* Check the magic number, corrupted if wrong.
*/
if (unlikely(INT_GET(block->hdr.magic, ARCH_CONVERT)
!= XFS_DIR2_BLOCK_MAGIC)) {
if (unlikely(be32_to_cpu(block->hdr.magic) != XFS_DIR2_BLOCK_MAGIC)) {
XFS_CORRUPTION_ERROR("xfs_dir2_block_addname",
XFS_ERRLEVEL_LOW, mp, block);
xfs_da_brelse(tp, bp);
Expand Down Expand Up @@ -138,7 +137,7 @@ xfs_dir2_block_addname(
*/
else {
dup = (xfs_dir2_data_unused_t *)
((char *)block + INT_GET(bf[0].offset, ARCH_CONVERT));
((char *)block + be16_to_cpu(bf[0].offset));
if (dup == enddup) {
/*
* It is the biggest freespace, is it too small
Expand All @@ -149,10 +148,10 @@ xfs_dir2_block_addname(
* Yes, we use the second-largest
* entry instead if it works.
*/
if (INT_GET(bf[1].length, ARCH_CONVERT) >= len)
if (be16_to_cpu(bf[1].length) >= len)
dup = (xfs_dir2_data_unused_t *)
((char *)block +
INT_GET(bf[1].offset, ARCH_CONVERT));
be16_to_cpu(bf[1].offset));
else
dup = NULL;
}
Expand All @@ -172,9 +171,9 @@ xfs_dir2_block_addname(
* If there are stale entries we'll use one for the leaf.
* Is the biggest entry enough to avoid compaction?
*/
else if (INT_GET(bf[0].length, ARCH_CONVERT) >= len) {
else if (be16_to_cpu(bf[0].length) >= len) {
dup = (xfs_dir2_data_unused_t *)
((char *)block + INT_GET(bf[0].offset, ARCH_CONVERT));
((char *)block + be16_to_cpu(bf[0].offset));
compact = 0;
}
/*
Expand Down Expand Up @@ -935,7 +934,7 @@ xfs_dir2_leaf_to_block(
goto out;
}
block = dbp->data;
ASSERT(INT_GET(block->hdr.magic, ARCH_CONVERT) == XFS_DIR2_DATA_MAGIC);
ASSERT(be32_to_cpu(block->hdr.magic) == XFS_DIR2_DATA_MAGIC);
/*
* Size of the "leaf" area in the block.
*/
Expand All @@ -956,7 +955,7 @@ xfs_dir2_leaf_to_block(
/*
* Start converting it to block form.
*/
INT_SET(block->hdr.magic, ARCH_CONVERT, XFS_DIR2_BLOCK_MAGIC);
block->hdr.magic = cpu_to_be32(XFS_DIR2_BLOCK_MAGIC);
needlog = 1;
needscan = 0;
/*
Expand Down Expand Up @@ -1095,7 +1094,7 @@ xfs_dir2_sf_to_block(
return error;
}
block = bp->data;
INT_SET(block->hdr.magic, ARCH_CONVERT, XFS_DIR2_BLOCK_MAGIC);
block->hdr.magic = cpu_to_be32(XFS_DIR2_BLOCK_MAGIC);
/*
* Compute size of block "tail" area.
*/
Expand Down
Loading

0 comments on commit f263104

Please sign in to comment.