Btrfs: expand free space tree sanity tests to catch endianness bug
authorOmar Sandoval <osandov@fb.com>
Fri, 23 Sep 2016 00:24:24 +0000 (17:24 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Oct 2016 16:52:14 +0000 (18:52 +0200)
commit781e3bcf0e7632736d7562b52451a2d4fdfa231c
treed58c9f756b1c6d0ba66b19c6ce219277e0c94df2
parent9426ce754fab0f02a45b61402119c57de446ffa3
Btrfs: expand free space tree sanity tests to catch endianness bug

The free space tree format conversion functions were broken on
big-endian systems, but the sanity tests didn't catch it because all of
the operations were aligned to multiple words. This was meant to catch
any bugs in the extent buffer code's handling of high memory, but it
ended up hiding the endianness bug. Expand the tests to do both
sector-aligned and page-aligned operations.

Tested-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tests/free-space-tree-tests.c