~vcs-imports/btrfs-tools/unstable

Viewing all changes in revision 1287.

  • Committer: David Sterba
  • Author(s): Zach Brown
  • Date: 2014-08-22 14:09:55 UTC
  • Revision ID: git-v1:dace60fc82c10f746a6db89885ef02485fbaaba1
btrfs-progs: fix unaligned loads in receive

A user reported corruption after receiving subvolumes.  Turning up the
logging during the receive showed that the commands and string
attributes were being received correctly but the u64 attrbutes were
sometimes corrupted by having variable number of low order bytes
introduced.

It turned out they were on a platform that corrupts unaligned userspace
loads.  Loading the u64s from the unaligned pointers into the received
command stream with get_unaligned() fixed the problem.

Reported-By: Klaus Holler <kho@gmx.at>
Tested-By: Klaus Holler <kho@gmx.at>
Signed-off-by: Zach Brown <zab@zabbo.net>
Signed-off-by: David Sterba <dsterba@suse.cz>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: