]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: ensure we copy buffer type in da btree root splits
authorDave Chinner <dchinner@redhat.com>
Mon, 2 Sep 2013 00:32:01 +0000 (10:32 +1000)
committerBen Myers <bpm@sgi.com>
Tue, 10 Sep 2013 18:34:05 +0000 (13:34 -0500)
commit0a4edc8f0b54cd5f613e7fda7dc8106cb9869bc9
tree79182ecb80b5bac9d78af62ea7365a8bc2202e50
parentdaf7b799a944d28a50caaa512011f5a0eb5a4076
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>
fs/xfs/xfs_da_btree.c