Skip to contentSkip to conversation

btrfs: use PLATFORM_NO_UNALIGNED to allow unaligned access

PATCH New Stefan Agner 1 participant 1 message Jul 1, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 btrfs: use PLATFORM_NO_UNALIGNED to allow unaligned access

Reading the super block leads to data abort crashes. Enabling the no unaligned
option works around this. Since the format of the super block is fixed by
the on-disk format unaligned access might by necessary in order to have btrfs
support at all.

---
  fs/btrfs/Makefile | 1 +
  1 file changed, 1 insertion(+)
fs/btrfs/Makefile +1 -0
index a9e2021..104a06e 100644
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_FS_BTR) := btrfs.o
  SRCS	:= $(AOBJS:.o=.S) $(COBJS-y:.o=.c)
  OBJS	:= $(addprefix $(obj),$(AOBJS) $(COBJS-y))
 
+$(obj)btrfs.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
 
  all:	$(LIB) $(AOBJS)
 
Signature · 1 line
1.8.3.1