]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: ensure we copy buffer type in da btree root splits
authorDave Chinner <dchinner@redhat.com>
Mon, 30 Sep 2013 03:15:17 +0000 (03:15 +0000)
committerRich Johnston <rjohnston@sgi.com>
Thu, 17 Oct 2013 19:46:28 +0000 (14:46 -0500)
commite26915ee1e90908a686dd8aa5f7b88de903e9da2
tree6f923ab6e2768298d8814080b57349b383ce9bc9
parent36bca8993f52be84f31c476449ca1527d62e16e1
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: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
libxfs/xfs_da_btree.c