aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-09-01 20:32:01 -0400
committerBen Myers <bpm@sgi.com>2013-09-10 14:34:05 -0400
commit0a4edc8f0b54cd5f613e7fda7dc8106cb9869bc9 (patch)
tree79182ecb80b5bac9d78af62ea7365a8bc2202e50 /fs
parentdaf7b799a944d28a50caaa512011f5a0eb5a4076 (diff)
xfs: ensure we copy buffer type in da btree root splits
When splitting the root of the da btree, we shuffled data between buffers and the structures that track them. At one point, we copy data and state from one buffer to another, including the ops associated with the buffer. When we do this, we also need to copy the buffer type associated with the buf log item so that the buffer is logged correctly. If we don't do that, log recovery won't recognise it and hence it won't recalculate the CRC on the buffer after recovery. This leads to a directory block that can't be read after recovery has run. Found by inspection after finding the same problem with remote symlink buffers. 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')
-rw-r--r--fs/xfs/xfs_da_btree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index d4e59a4ff59f..069537c845e5 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -635,6 +635,7 @@ xfs_da3_root_split(
635 xfs_trans_log_buf(tp, bp, 0, size - 1); 635 xfs_trans_log_buf(tp, bp, 0, size - 1);
636 636
637 bp->b_ops = blk1->bp->b_ops; 637 bp->b_ops = blk1->bp->b_ops;
638 xfs_trans_buf_copy_type(bp, blk1->bp);
638 blk1->bp = bp; 639 blk1->bp = bp;
639 blk1->blkno = blkno; 640 blk1->blkno = blkno;
640 641