diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-09-27 13:33:09 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 19:27:52 (GMT) |
commit | f9bbe6ea80e700ee620ef26902eb2decec17b258 (patch) | |
tree | 3163f65a5a83dc14c1f0a1eee5e6d68c531000d4 /crypto | |
parent | 5a9007740a12827ead4b6131782d731986831a18 (diff) | |
download | linux-fsl-qoriq-f9bbe6ea80e700ee620ef26902eb2decec17b258.tar.xz |
Btrfs: relocate csums properly with prealloc extents
commit 4577b014d1bc3db386da3246f625888fc48083a9 upstream.
A user reported a problem where they were getting csum errors when running a
balance and running systemd's journal. This is because systemd is awesome and
fallocate()'s its log space and writes into it. Unfortunately we assume that
when we read in all the csums for an extent that they are sequential starting at
the bytenr we care about. This obviously isn't the case for prealloc extents,
where we could have written to the middle of the prealloc extent only, which
means the csum would be for the bytenr in the middle of our range and not the
front of our range. Fix this by offsetting the new bytenr we are logging to
based on the original bytenr the csum was for. With this patch I no longer see
the csum errors I was seeing. Thanks,
Reported-by: Chris Murphy <lists@colorremedies.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions