[arch-commits] Commit in btrfs-progs/trunk (2 files)

Tobias Powalowski tpowa at nymeria.archlinux.org
Mon Oct 28 11:57:32 UTC 2013


    Date: Monday, October 28, 2013 @ 12:57:31
  Author: tpowa
Revision: 197685

upgpkg: btrfs-progs 0.20rc1.3-2

#37516 fix conversion from ext4

Added:
  btrfs-progs/trunk/Btrfs-progs-fix-wrong-arg-sb_bytenr-for-btrfs_scan_fs_devices.patch
Modified:
  btrfs-progs/trunk/PKGBUILD

---------------------------------------------------------------------+
 Btrfs-progs-fix-wrong-arg-sb_bytenr-for-btrfs_scan_fs_devices.patch |   71 ++++++++++
 PKGBUILD                                                            |   17 +-
 2 files changed, 83 insertions(+), 5 deletions(-)

Added: Btrfs-progs-fix-wrong-arg-sb_bytenr-for-btrfs_scan_fs_devices.patch
===================================================================
--- Btrfs-progs-fix-wrong-arg-sb_bytenr-for-btrfs_scan_fs_devices.patch	                        (rev 0)
+++ Btrfs-progs-fix-wrong-arg-sb_bytenr-for-btrfs_scan_fs_devices.patch	2013-10-28 11:57:31 UTC (rev 197685)
@@ -0,0 +1,71 @@
+diff --git a/btrfs-find-root.c b/btrfs-find-root.c
+index 9b3d7df..374cf81 100644
+--- a/btrfs-find-root.c
++++ b/btrfs-find-root.c
+@@ -82,7 +82,7 @@ static struct btrfs_root *open_ctree_broken(int fd, const char *device)
+ 		return NULL;
+ 	}
+ 
+-	ret = btrfs_scan_fs_devices(fd, device, &fs_devices);
++	ret = btrfs_scan_fs_devices(fd, device, &fs_devices, 0);
+ 	if (ret)
+ 		goto out;
+ 
+diff --git a/cmds-chunk.c b/cmds-chunk.c
+index 03314de..6ada328 100644
+--- a/cmds-chunk.c
++++ b/cmds-chunk.c
+@@ -1291,7 +1291,7 @@ static int recover_prepare(struct recover_control *rc, char *path)
+ 		goto fail_free_sb;
+ 	}
+ 
+-	ret = btrfs_scan_fs_devices(fd, path, &fs_devices);
++	ret = btrfs_scan_fs_devices(fd, path, &fs_devices, 0);
+ 	if (ret)
+ 		goto fail_free_sb;
+ 
+diff --git a/disk-io.c b/disk-io.c
+index 13dbe27..f8e236c 100644
+--- a/disk-io.c
++++ b/disk-io.c
+@@ -909,13 +909,16 @@ void btrfs_cleanup_all_caches(struct btrfs_fs_info *fs_info)
+ }
+ 
+ int btrfs_scan_fs_devices(int fd, const char *path,
+-			  struct btrfs_fs_devices **fs_devices)
++			  struct btrfs_fs_devices **fs_devices,
++			  u64 sb_bytenr)
+ {
+ 	u64 total_devs;
+ 	int ret;
++	if (!sb_bytenr)
++		sb_bytenr = BTRFS_SUPER_INFO_OFFSET;
+ 
+ 	ret = btrfs_scan_one_device(fd, path, fs_devices,
+-				    &total_devs, BTRFS_SUPER_INFO_OFFSET);
++				    &total_devs, sb_bytenr);
+ 	if (ret) {
+ 		fprintf(stderr, "No valid Btrfs found on %s\n", path);
+ 		return ret;
+@@ -1001,7 +1004,7 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
+ 	if (restore)
+ 		fs_info->on_restoring = 1;
+ 
+-	ret = btrfs_scan_fs_devices(fp, path, &fs_devices);
++	ret = btrfs_scan_fs_devices(fp, path, &fs_devices, sb_bytenr);
+ 	if (ret)
+ 		goto out;
+ 
+diff --git a/disk-io.h b/disk-io.h
+index effaa9f..bc749c3 100644
+--- a/disk-io.h
++++ b/disk-io.h
+@@ -59,7 +59,7 @@ int btrfs_setup_all_roots(struct btrfs_fs_info *fs_info,
+ void btrfs_release_all_roots(struct btrfs_fs_info *fs_info);
+ void btrfs_cleanup_all_caches(struct btrfs_fs_info *fs_info);
+ int btrfs_scan_fs_devices(int fd, const char *path,
+-			  struct btrfs_fs_devices **fs_devices);
++			  struct btrfs_fs_devices **fs_devices, u64 sb_bytenr);
+ int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info);
+ 
+ struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, int writes);

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-10-28 11:07:43 UTC (rev 197684)
+++ PKGBUILD	2013-10-28 11:57:31 UTC (rev 197685)
@@ -4,7 +4,7 @@
 
 pkgname=btrfs-progs
 pkgver=0.20rc1.3
-pkgrel=1
+pkgrel=2
 pkgdesc="btrfs filesystem utilities"
 arch=(i686 x86_64)
 depends=('glibc' 'e2fsprogs' 'lzo2')
@@ -16,10 +16,20 @@
 license=('GPL2')
 source=("git://git.kernel.org/pub/scm/linux/kernel/git/mason/${pkgname}.git#commit=194aa4a1bd6447bb545286d0bcb0b0be8204d79f"
 	initcpio-install-btrfs
-	initcpio-hook-btrfs)
+	initcpio-hook-btrfs
+	Btrfs-progs-fix-wrong-arg-sb_bytenr-for-btrfs_scan_fs_devices.patch)
 install=btrfs-progs.install
 options=(!staticlibs)
+md5sums=('SKIP'
+         '7241ba3a4286d08da0d50b7176941112'
+         'b09688a915a0ec8f40e2f5aacbabc9ad'
+         '1ef602823a7a09f98cd713f52aa33f20')
 
+prepare() {
+   cd $pkgname
+   patch -Np1 -i $srcdir/Btrfs-progs-fix-wrong-arg-sb_bytenr-for-btrfs_scan_fs_devices.patch
+}
+
 build() {
    cd $pkgname
    make CFLAGS="$CFLAGS"
@@ -42,6 +52,3 @@
    install -Dm644 "$srcdir/initcpio-hook-btrfs" \
      "$pkgdir/usr/lib/initcpio/hooks/btrfs"
 }
-md5sums=('SKIP'
-         '7241ba3a4286d08da0d50b7176941112'
-         'b09688a915a0ec8f40e2f5aacbabc9ad')




More information about the arch-commits mailing list