diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-04-24 04:58:02 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-04-27 13:33:38 -0400 |
commit | f5ea110044fa858925a880b4fa9f551bfa2dfc38 (patch) | |
tree | eb0a3d50a8a1a475c13b99bbe88472e421866f47 /fs/xfs/xfs_dir2_node.c | |
parent | 6b2647a12a00bdad431ac1e9049c5e8579aa7869 (diff) |
xfs: add CRCs to dir2/da node blocks
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_node.c')
-rw-r--r-- | fs/xfs/xfs_dir2_node.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index baaf9d96e354..122449b33f5e 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c | |||
@@ -1371,7 +1371,7 @@ xfs_dir2_leafn_split( | |||
1371 | * block into the leaves. | 1371 | * block into the leaves. |
1372 | */ | 1372 | */ |
1373 | xfs_dir2_leafn_rebalance(state, oldblk, newblk); | 1373 | xfs_dir2_leafn_rebalance(state, oldblk, newblk); |
1374 | error = xfs_da_blk_link(state, oldblk, newblk); | 1374 | error = xfs_da3_blk_link(state, oldblk, newblk); |
1375 | if (error) { | 1375 | if (error) { |
1376 | return error; | 1376 | return error; |
1377 | } | 1377 | } |
@@ -1452,7 +1452,7 @@ xfs_dir2_leafn_toosmall( | |||
1452 | */ | 1452 | */ |
1453 | forward = (leafhdr.forw != 0); | 1453 | forward = (leafhdr.forw != 0); |
1454 | memcpy(&state->altpath, &state->path, sizeof(state->path)); | 1454 | memcpy(&state->altpath, &state->path, sizeof(state->path)); |
1455 | error = xfs_da_path_shift(state, &state->altpath, forward, 0, | 1455 | error = xfs_da3_path_shift(state, &state->altpath, forward, 0, |
1456 | &rval); | 1456 | &rval); |
1457 | if (error) | 1457 | if (error) |
1458 | return error; | 1458 | return error; |
@@ -1514,10 +1514,10 @@ xfs_dir2_leafn_toosmall( | |||
1514 | */ | 1514 | */ |
1515 | memcpy(&state->altpath, &state->path, sizeof(state->path)); | 1515 | memcpy(&state->altpath, &state->path, sizeof(state->path)); |
1516 | if (blkno < blk->blkno) | 1516 | if (blkno < blk->blkno) |
1517 | error = xfs_da_path_shift(state, &state->altpath, forward, 0, | 1517 | error = xfs_da3_path_shift(state, &state->altpath, forward, 0, |
1518 | &rval); | 1518 | &rval); |
1519 | else | 1519 | else |
1520 | error = xfs_da_path_shift(state, &state->path, forward, 0, | 1520 | error = xfs_da3_path_shift(state, &state->path, forward, 0, |
1521 | &rval); | 1521 | &rval); |
1522 | if (error) { | 1522 | if (error) { |
1523 | return error; | 1523 | return error; |
@@ -1614,7 +1614,7 @@ xfs_dir2_node_addname( | |||
1614 | * Look up the name. We're not supposed to find it, but | 1614 | * Look up the name. We're not supposed to find it, but |
1615 | * this gives us the insertion point. | 1615 | * this gives us the insertion point. |
1616 | */ | 1616 | */ |
1617 | error = xfs_da_node_lookup_int(state, &rval); | 1617 | error = xfs_da3_node_lookup_int(state, &rval); |
1618 | if (error) | 1618 | if (error) |
1619 | rval = error; | 1619 | rval = error; |
1620 | if (rval != ENOENT) { | 1620 | if (rval != ENOENT) { |
@@ -1640,7 +1640,7 @@ xfs_dir2_node_addname( | |||
1640 | * It worked, fix the hash values up the btree. | 1640 | * It worked, fix the hash values up the btree. |
1641 | */ | 1641 | */ |
1642 | if (!(args->op_flags & XFS_DA_OP_JUSTCHECK)) | 1642 | if (!(args->op_flags & XFS_DA_OP_JUSTCHECK)) |
1643 | xfs_da_fixhashpath(state, &state->path); | 1643 | xfs_da3_fixhashpath(state, &state->path); |
1644 | } else { | 1644 | } else { |
1645 | /* | 1645 | /* |
1646 | * It didn't work, we need to split the leaf block. | 1646 | * It didn't work, we need to split the leaf block. |
@@ -1652,7 +1652,7 @@ xfs_dir2_node_addname( | |||
1652 | /* | 1652 | /* |
1653 | * Split the leaf block and insert the new entry. | 1653 | * Split the leaf block and insert the new entry. |
1654 | */ | 1654 | */ |
1655 | rval = xfs_da_split(state); | 1655 | rval = xfs_da3_split(state); |
1656 | } | 1656 | } |
1657 | done: | 1657 | done: |
1658 | xfs_da_state_free(state); | 1658 | xfs_da_state_free(state); |
@@ -2030,7 +2030,7 @@ xfs_dir2_node_addname_int( | |||
2030 | 2030 | ||
2031 | /* | 2031 | /* |
2032 | * Lookup an entry in a node-format directory. | 2032 | * Lookup an entry in a node-format directory. |
2033 | * All the real work happens in xfs_da_node_lookup_int. | 2033 | * All the real work happens in xfs_da3_node_lookup_int. |
2034 | * The only real output is the inode number of the entry. | 2034 | * The only real output is the inode number of the entry. |
2035 | */ | 2035 | */ |
2036 | int /* error */ | 2036 | int /* error */ |
@@ -2055,7 +2055,7 @@ xfs_dir2_node_lookup( | |||
2055 | /* | 2055 | /* |
2056 | * Fill in the path to the entry in the cursor. | 2056 | * Fill in the path to the entry in the cursor. |
2057 | */ | 2057 | */ |
2058 | error = xfs_da_node_lookup_int(state, &rval); | 2058 | error = xfs_da3_node_lookup_int(state, &rval); |
2059 | if (error) | 2059 | if (error) |
2060 | rval = error; | 2060 | rval = error; |
2061 | else if (rval == ENOENT && args->cmpresult == XFS_CMP_CASE) { | 2061 | else if (rval == ENOENT && args->cmpresult == XFS_CMP_CASE) { |
@@ -2110,7 +2110,7 @@ xfs_dir2_node_removename( | |||
2110 | /* | 2110 | /* |
2111 | * Look up the entry we're deleting, set up the cursor. | 2111 | * Look up the entry we're deleting, set up the cursor. |
2112 | */ | 2112 | */ |
2113 | error = xfs_da_node_lookup_int(state, &rval); | 2113 | error = xfs_da3_node_lookup_int(state, &rval); |
2114 | if (error) | 2114 | if (error) |
2115 | rval = error; | 2115 | rval = error; |
2116 | /* | 2116 | /* |
@@ -2134,12 +2134,12 @@ xfs_dir2_node_removename( | |||
2134 | /* | 2134 | /* |
2135 | * Fix the hash values up the btree. | 2135 | * Fix the hash values up the btree. |
2136 | */ | 2136 | */ |
2137 | xfs_da_fixhashpath(state, &state->path); | 2137 | xfs_da3_fixhashpath(state, &state->path); |
2138 | /* | 2138 | /* |
2139 | * If we need to join leaf blocks, do it. | 2139 | * If we need to join leaf blocks, do it. |
2140 | */ | 2140 | */ |
2141 | if (rval && state->path.active > 1) | 2141 | if (rval && state->path.active > 1) |
2142 | error = xfs_da_join(state); | 2142 | error = xfs_da3_join(state); |
2143 | /* | 2143 | /* |
2144 | * If no errors so far, try conversion to leaf format. | 2144 | * If no errors so far, try conversion to leaf format. |
2145 | */ | 2145 | */ |
@@ -2181,7 +2181,7 @@ xfs_dir2_node_replace( | |||
2181 | /* | 2181 | /* |
2182 | * Lookup the entry to change in the btree. | 2182 | * Lookup the entry to change in the btree. |
2183 | */ | 2183 | */ |
2184 | error = xfs_da_node_lookup_int(state, &rval); | 2184 | error = xfs_da3_node_lookup_int(state, &rval); |
2185 | if (error) { | 2185 | if (error) { |
2186 | rval = error; | 2186 | rval = error; |
2187 | } | 2187 | } |