summaryrefslogtreecommitdiff
path: root/colorize.h
blob: 928deb2c9fe1b4feab254ca02e95e2837c6cda48 (plain)
1
2
3
4
5
6
7
8
#ifndef COLORIZE_H
#define COLORIZE_H

#define colorize_start(fore)		"\033[" __##fore "m"
#define colorize_start_full(fore, back)	"\033[" __##fore ";" __on_##back "m"
#define colorize_end()			"\033[" __reset "m"

#endif /* COLORIZE_H */
it info' class='commit-info'> authorOmar Sandoval <osandov@fb.com>2016-09-22 17:24:20 -0700 committerDavid Sterba <dsterba@suse.com>2016-10-03 18:52:14 +0200 commit2fe1d55134fce05c17ea118a2e37a4af771887bc (patch) tree1a62e8f01bf5046337072e950c5d329c30611e6e parent08895a8b6b06ed2323cd97a36ee40a116b3db8ed (diff)
Btrfs: fix free space tree bitmaps on big-endian systems
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+ Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com> 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>
Diffstat