Thread (31 messages) 31 messages, 6 authors, 2016-10-01

Re: [PATCH v2 1/6] Btrfs: fix free space tree bitmaps on big-endian systems

From: Holger Hoffstätte <hidden>
Date: 2016-09-23 14:38:07

On Thu, 22 Sep 2016 17:24:20 -0700, Omar Sandoval wrote:
From: Omar Sandoval <redacted>

In convert_free_space_to_{bitmaps,extents}(), we buffer the free space
bitmaps in memory and copy them directly to/from the extent buffers with
{read,write}_extent_buffer(). The extent buffer bitmap helpers use byte
granularity, which is equivalent to a little-endian bitmap. This means
that on big-endian systems, the in-memory bitmaps will be written to
disk byte-swapped. To fix this, use byte-granularity for the bitmaps in
memory.

Fixes: a5ed91828518 ("Btrfs: implement the free space B-tree")
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: Omar Sandoval <redacted>
Tested-by: Holger Hoffstätte <redacted>
(only for regressions on little-endian x86-64)

Thanks!
Holger
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help