Hello,

Following is an update from btrfs-progs 0.18 to 0.19. This new version
is made for kernel 2.6.31 and higher, as there was an on-disk format
change in 2.6.31. This change is non-backward compatible and anyone who
upgraded to 2.6.31 can't get back to the old format : beware of that (I
hope nobody falled into this ... but I think I may be the only one using
this fs on openwrt ?).
This patch also add an init script that scan disk for multiple-device
(RAID) btrfs volumes.

Signed-off-by: Benjamin Cama <[email protected]>

---
Index: btrfs-progs/files/btrfs-scan.init
===================================================================
--- btrfs-progs/files/btrfs-scan.init   (révision 0)
+++ btrfs-progs/files/btrfs-scan.init   (révision 0)
@@ -0,0 +1,9 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2009 OpenWrt.org
+
+START=19
+
+start() {
+       grep -q btrfs /proc/modules && /usr/bin/btrfsctl -a
+}
+
Index: btrfs-progs/patches/001-Makefile-gcc-fix
===================================================================
--- btrfs-progs/patches/001-Makefile-gcc-fix    (révision 18623)
+++ btrfs-progs/patches/001-Makefile-gcc-fix    (copie de travail)
@@ -1,5 +1,5 @@
 diff --git a/Makefile b/Makefile
-index 3349079..cf5392f 100644
+index 8097b5a..63a734b 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -36,37 +36,37 @@ version:
@@ -17,9 +17,9 @@
 -      gcc $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
 +      $(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
  
- btrfsck: $(objects) btrfsck.o bit-radix.o
--      gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o $(LDFLAGS) 
$(LIBS)
-+      $(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o $(LDFLAGS) 
$(LIBS)
+ btrfsck: $(objects) btrfsck.o
+-      gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS)
++      $(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS)
  
  mkfs.btrfs: $(objects) mkfs.o
 -      gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
@@ -49,5 +49,5 @@
 -      gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) 
$(LIBS)
 +      $(CC) $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs 
$(LDFLAGS) $(LIBS)
  
- clean :
-       rm -f $(progs) cscope.out *.o .*.d btrfs-convert
+ manpages:
+       cd man; make
Index: btrfs-progs/Makefile
===================================================================
--- btrfs-progs/Makefile        (révision 18623)
+++ btrfs-progs/Makefile        (copie de travail)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
-PKG_VERSION:=0.18
+PKG_VERSION:=0.19
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/
-PKG_MD5SUM:=1dfe59152a558eb2f79a4c398de6c4ef
+PKG_MD5SUM:=69e29ecd922e3f9dcb74a3a8f80b4f68
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -32,8 +32,7 @@
  GPL and open for contribution from anyone. 
 endef
 
-progs = btrfsctl btrfsck mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol \
-       btrfstune btrfs-image
+progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
@@ -48,6 +47,8 @@
 define Package/btrfs-progs/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) 
$(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan
 endef
 
 $(eval $(call BuildPackage,btrfs-progs))


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to