aboutsummaryrefslogtreecommitdiffstats
path: root/kerncompat.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2016-07-15 12:12:48 -0700
committerDavid Sterba <dsterba@suse.com>2016-07-26 18:35:05 +0200
commit1d6c7cb725bb7d25981d44915b316e24751b7b72 (patch)
tree7199982cc55d2a8631191bcd98ac9cbabd54f3b9 /kerncompat.h
parent029772be1152bbdf921ee74b95cfcde4003f5e46 (diff)
downloadbtrfs-progs-1d6c7cb725bb7d25981d44915b316e24751b7b72.tar.gz
btrfs-progs-1d6c7cb725bb7d25981d44915b316e24751b7b72.tar.xz
btrfs-progs-1d6c7cb725bb7d25981d44915b316e24751b7b72.zip
btrfs-progs: fix btrfsck of space_cache=v2 bitmaps on big-endian
Copy le_test_bit() from the kernel and use that for the free space tree bitmaps. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'kerncompat.h')
-rw-r--r--kerncompat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kerncompat.h b/kerncompat.h
index 378f055..c9b9b79 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -55,7 +55,8 @@
#define gfp_t int
#define get_cpu_var(p) (p)
#define __get_cpu_var(p) (p)
-#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
+#define BITS_PER_BYTE 8
+#define BITS_PER_LONG (__SIZEOF_LONG__ * BITS_PER_BYTE)
#define __GFP_BITS_SHIFT 20
#define __GFP_BITS_MASK ((int)((1 << __GFP_BITS_SHIFT) - 1))
#define GFP_KERNEL 0