[btrfs-progs: 1/2] - update to latest upstream btrfs-progs

Josef Bacik josef at fedoraproject.org
Wed Oct 17 18:14:16 UTC 2012


commit 0124baa3685c7fc226b516c451f23f554b88c997
Author: Josef Bacik <josef at localhost.localdomain>
Date:   Wed Oct 17 14:09:50 2012 -0400

    - update to latest upstream btrfs-progs

 ...-detect-if-the-disk-we-are-formatting-is-.patch |   61 +++------
 ...-only-enforce-a-maximum-size-if-we-specif.patch |  143 --------------------
 btrfs-progs-build-fixes.patch                      |   20 ++--
 btrfs-progs.spec                                   |    9 +-
 4 files changed, 33 insertions(+), 200 deletions(-)
---
diff --git a/Btrfs-progs-detect-if-the-disk-we-are-formatting-is-.patch b/Btrfs-progs-detect-if-the-disk-we-are-formatting-is-.patch
index ef8528d..fe04876 100644
--- a/Btrfs-progs-detect-if-the-disk-we-are-formatting-is-.patch
+++ b/Btrfs-progs-detect-if-the-disk-we-are-formatting-is-.patch
@@ -1,27 +1,7 @@
-From f507119002c6bb972df09a47edfa8998c0fc8172 Mon Sep 17 00:00:00 2001
-From: Josef Bacik <jbacik at fusionio.com>
-Date: Fri, 20 Jul 2012 11:09:43 -0400
-Subject: [PATCH 2/3] Btrfs-progs: detect if the disk we are formatting is a
- ssd
-
-SSD's do not gain anything by having metadata DUP turned on.  The underlying
-file system that is a part of all SSD's could easily map duplicate metadat
-blocks into the same erase block which effectively eliminates the benefit of
-duplicating the metadata on disk.  So detect if we are formatting a single
-SSD drive and if we are do not use DUP.  Thanks,
-
-Signed-off-by: Josef Bacik <jbacik at fusionio.com>
----
- Makefile            |    2 +-
- man/mkfs.btrfs.8.in |    5 +++-
- mkfs.c              |   58 ++++++++++++++++++++++++++++++++++++++++++++++++--
- 3 files changed, 60 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c0aaa3d..1afef49 100644
---- a/Makefile
-+++ b/Makefile
-@@ -66,7 +66,7 @@ btrfsck: $(objects) btrfsck.o
+diff -up btrfs-progs-0.20.rc1.20121017git91d9eec/Makefile.patch4 btrfs-progs-0.20.rc1.20121017git91d9eec/Makefile
+--- btrfs-progs-0.20.rc1.20121017git91d9eec/Makefile.patch4	2012-10-04 20:35:31.000000000 -0400
++++ btrfs-progs-0.20.rc1.20121017git91d9eec/Makefile	2012-10-17 13:48:02.331453645 -0400
+@@ -67,7 +67,7 @@ btrfsck: $(objects) btrfsck.o
  	$(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS)
  
  mkfs.btrfs: $(objects) mkfs.o
@@ -30,11 +10,10 @@ index c0aaa3d..1afef49 100644
  
  btrfs-debug-tree: $(objects) debug-tree.o
  	$(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS)
-diff --git a/man/mkfs.btrfs.8.in b/man/mkfs.btrfs.8.in
-index fc2e1d2..dfa7996 100644
---- a/man/mkfs.btrfs.8.in
-+++ b/man/mkfs.btrfs.8.in
-@@ -46,7 +46,10 @@ Specify a label for the filesystem.
+diff -up btrfs-progs-0.20.rc1.20121017git91d9eec/man/mkfs.btrfs.8.in.patch4 btrfs-progs-0.20.rc1.20121017git91d9eec/man/mkfs.btrfs.8.in
+--- btrfs-progs-0.20.rc1.20121017git91d9eec/man/mkfs.btrfs.8.in.patch4	2012-10-04 20:35:31.000000000 -0400
++++ btrfs-progs-0.20.rc1.20121017git91d9eec/man/mkfs.btrfs.8.in	2012-10-17 13:48:02.331453645 -0400
+@@ -47,7 +47,10 @@ Specify a label for the filesystem.
  .TP
  \fB\-m\fR, \fB\-\-metadata \fIprofile\fR
  Specify how metadata must be spanned across the devices specified. Valid
@@ -46,10 +25,9 @@ index fc2e1d2..dfa7996 100644
  .TP
  \fB\-M\fR, \fB\-\-mixed\fR
  Mix data and metadata chunks together for more efficient space 
-diff --git a/mkfs.c b/mkfs.c
-index dff5eb8..8816db8 100644
---- a/mkfs.c
-+++ b/mkfs.c
+diff -up btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c.patch4 btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c
+--- btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c.patch4	2012-10-17 13:48:02.329453660 -0400
++++ btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c	2012-10-17 13:53:36.954806793 -0400
 @@ -37,6 +37,7 @@
  #include <linux/fs.h>
  #include <ctype.h>
@@ -58,7 +36,7 @@ index dff5eb8..8816db8 100644
  #include "kerncompat.h"
  #include "ctree.h"
  #include "disk-io.h"
-@@ -234,7 +235,7 @@ static int create_one_raid_group(struct btrfs_trans_handle *trans,
+@@ -234,7 +235,7 @@ static int create_one_raid_group(struct
  static int create_raid_groups(struct btrfs_trans_handle *trans,
  			      struct btrfs_root *root, u64 data_profile,
  			      int data_profile_opt, u64 metadata_profile,
@@ -67,7 +45,7 @@ index dff5eb8..8816db8 100644
  {
  	u64 num_devices = btrfs_super_num_devices(&root->fs_info->super_copy);
  	u64 allowed;
-@@ -245,8 +246,12 @@ static int create_raid_groups(struct btrfs_trans_handle *trans,
+@@ -245,8 +246,12 @@ static int create_raid_groups(struct btr
  	 * For mixed groups defaults are single/single.
  	 */
  	if (!metadata_profile_opt && !mixed) {
@@ -81,8 +59,8 @@ index dff5eb8..8816db8 100644
  	}
  	if (!data_profile_opt && !mixed) {
  		data_profile = (num_devices > 1) ?
-@@ -1201,6 +1206,49 @@ static int zero_output_file(int out_fd, u64 size, u32 sectorsize)
- 	return ret;
+@@ -1215,6 +1220,49 @@ static int check_leaf_or_node_size(u32 s
+ 	return 0;
  }
  
 +static int is_ssd(const char *file)
@@ -131,7 +109,7 @@ index dff5eb8..8816db8 100644
  int main(int ac, char **av)
  {
  	char *file;
-@@ -1227,6 +1275,7 @@ int main(int ac, char **av)
+@@ -1241,6 +1289,7 @@ int main(int ac, char **av)
  	int data_profile_opt = 0;
  	int metadata_profile_opt = 0;
  	int nodiscard = 0;
@@ -139,7 +117,7 @@ index dff5eb8..8816db8 100644
  
  	char *source_dir = NULL;
  	int source_dir_set = 0;
-@@ -1352,6 +1401,9 @@ int main(int ac, char **av)
+@@ -1360,6 +1409,9 @@ int main(int ac, char **av)
  			exit(1);
  		}
  	}
@@ -149,7 +127,7 @@ index dff5eb8..8816db8 100644
  	if (mixed) {
  		if (metadata_profile != data_profile) {
  			fprintf(stderr, "With mixed block groups data and metadata "
-@@ -1438,7 +1490,7 @@ raid_groups:
+@@ -1445,7 +1497,7 @@ raid_groups:
  	if (!source_dir_set) {
  		ret = create_raid_groups(trans, root, data_profile,
  				 data_profile_opt, metadata_profile,
@@ -158,6 +136,3 @@ index dff5eb8..8816db8 100644
  		BUG_ON(ret);
  	}
  
--- 
-1.7.7.6
-
diff --git a/btrfs-progs-build-fixes.patch b/btrfs-progs-build-fixes.patch
index 136ac62..4771e53 100644
--- a/btrfs-progs-build-fixes.patch
+++ b/btrfs-progs-build-fixes.patch
@@ -1,6 +1,6 @@
-diff -up btrfs-progs-0.19/btrfsck.c.orig btrfs-progs-0.19/btrfsck.c
---- btrfs-progs-0.19/btrfsck.c.orig	2012-04-11 10:44:44.000000000 -0400
-+++ btrfs-progs-0.19/btrfsck.c	2012-04-11 10:45:35.769767880 -0400
+diff -up btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c.patch2 btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c
+--- btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c.patch2	2012-10-04 20:35:31.000000000 -0400
++++ btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c	2012-10-17 13:45:30.172638798 -0400
 @@ -22,7 +22,9 @@
  #include <stdlib.h>
  #include <unistd.h>
@@ -11,10 +11,10 @@ diff -up btrfs-progs-0.19/btrfsck.c.orig btrfs-progs-0.19/btrfsck.c
  #include <getopt.h>
  #include "kerncompat.h"
  #include "ctree.h"
-diff -up btrfs-progs-0.19/mkfs.c.orig btrfs-progs-0.19/mkfs.c
---- btrfs-progs-0.19/mkfs.c.orig	2012-04-11 10:44:44.652047854 -0400
-+++ btrfs-progs-0.19/mkfs.c	2012-04-11 10:46:03.727553072 -0400
-@@ -1198,7 +1198,7 @@ int main(int ac, char **av)
+diff -up btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c.patch2 btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c
+--- btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c.patch2	2012-10-17 13:45:30.167638835 -0400
++++ btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c	2012-10-17 13:46:41.444084426 -0400
+@@ -1228,7 +1228,7 @@ int main(int ac, char **av)
  	u64 alloc_start = 0;
  	u64 metadata_profile = 0;
  	u64 data_profile = 0;
@@ -23,12 +23,12 @@ diff -up btrfs-progs-0.19/mkfs.c.orig btrfs-progs-0.19/mkfs.c
  	u32 sectorsize = 4096;
  	u32 nodesize = leafsize;
  	u32 stripesize = 4096;
-@@ -1270,7 +1270,7 @@ int main(int ac, char **av)
+@@ -1304,7 +1304,7 @@ int main(int ac, char **av)
  				print_usage();
  		}
  	}
 -	sectorsize = max(sectorsize, (u32)getpagesize());
 +	sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE));
- 	if (leafsize < sectorsize || (leafsize & (sectorsize - 1))) {
- 		fprintf(stderr, "Illegal leafsize %u\n", leafsize);
+ 	if (check_leaf_or_node_size(leafsize, sectorsize))
  		exit(1);
+ 	if (check_leaf_or_node_size(nodesize, sectorsize))
diff --git a/btrfs-progs.spec b/btrfs-progs.spec
index 936ac20..1c45615 100644
--- a/btrfs-progs.spec
+++ b/btrfs-progs.spec
@@ -1,5 +1,5 @@
 Name:           btrfs-progs
-Version:        0.19.20120817git043a639
+Version:        0.20.rc1.20121017git91d9eec
 Release:        1%{?dist}
 Summary:        Userspace programs for btrfs
 
@@ -12,8 +12,7 @@ Patch1: btrfs-progs-valgrind.patch
 Patch2: btrfs-progs-build-fixes.patch
 Patch3: Btrfs-progs-add-btrfs-device-ready-command.patch
 Patch4: Btrfs-progs-detect-if-the-disk-we-are-formatting-is-.patch
-Patch5: Btrfs-progs-only-enforce-a-maximum-size-if-we-specif.patch
-Patch6: btrfs-init-dev-list.patch
+Patch5: btrfs-init-dev-list.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -33,7 +32,6 @@ check, modify and correct any inconsistencies in the btrfs filesystem.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
 
 %build
 make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
@@ -70,6 +68,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/btrfs.8.gz
 
 %changelog
+* Wed Oct 17 2012 Josef Bacik <josef at toxicpanda.com> 0.20.rc1.20121017git91d9eec-1
+- update to latest btrfs-progs
+
 * Fri Aug 17 2012 Josef Bacik <josef at toxicpanda.com> 0.19.20120817git043a639-1
 - update to latest btrfs-progs
 


More information about the scm-commits mailing list