diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:31:48 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:31:48 -0400 |
commit | 5f0e5afa0de4522abb3ea7d1369039b94e740ec5 (patch) | |
tree | 6a5be3db9ecfed8ef2150c6146f6d1e0d658ac8b /fs/xfs/xfs_btree.c | |
parent | d752b2696072ed52fd5afab08b601e2220a3b87e (diff) | |
parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) |
Merge tag 'v3.10-rc7' into for-3.11/drivers
Linux 3.10-rc7
Pull this in early to avoid doing it with the bcache merge,
since there are a number of changes to bcache between my old
base (3.10-rc1) and the new pull request.
Diffstat (limited to 'fs/xfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/xfs_btree.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index 8804b8a3c310..0903960410a2 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c | |||
@@ -2544,7 +2544,17 @@ xfs_btree_new_iroot( | |||
2544 | if (error) | 2544 | if (error) |
2545 | goto error0; | 2545 | goto error0; |
2546 | 2546 | ||
2547 | /* | ||
2548 | * we can't just memcpy() the root in for CRC enabled btree blocks. | ||
2549 | * In that case have to also ensure the blkno remains correct | ||
2550 | */ | ||
2547 | memcpy(cblock, block, xfs_btree_block_len(cur)); | 2551 | memcpy(cblock, block, xfs_btree_block_len(cur)); |
2552 | if (cur->bc_flags & XFS_BTREE_CRC_BLOCKS) { | ||
2553 | if (cur->bc_flags & XFS_BTREE_LONG_PTRS) | ||
2554 | cblock->bb_u.l.bb_blkno = cpu_to_be64(cbp->b_bn); | ||
2555 | else | ||
2556 | cblock->bb_u.s.bb_blkno = cpu_to_be64(cbp->b_bn); | ||
2557 | } | ||
2548 | 2558 | ||
2549 | be16_add_cpu(&block->bb_level, 1); | 2559 | be16_add_cpu(&block->bb_level, 1); |
2550 | xfs_btree_set_numrecs(block, 1); | 2560 | xfs_btree_set_numrecs(block, 1); |