[libguestfs] Upstream patch to workaround btrfs problems with kernel 3.7.0.

Richard W.M. Jones rjones at fedoraproject.org
Wed Oct 10 10:19:50 UTC 2012


commit 2c9869b95150a5604b55b0e79eb87ac7e06f374f
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Oct 10 11:18:46 2012 +0100

    Upstream patch to workaround btrfs problems with kernel 3.7.0.

 ...n-extended-workaround-for-btrfs-failures-.patch |   36 ++++++++++++++++++++
 libguestfs.spec                                    |    9 ++++-
 2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/0001-btrfs-Add-an-extended-workaround-for-btrfs-failures-.patch b/0001-btrfs-Add-an-extended-workaround-for-btrfs-failures-.patch
new file mode 100644
index 0000000..49fe381
--- /dev/null
+++ b/0001-btrfs-Add-an-extended-workaround-for-btrfs-failures-.patch
@@ -0,0 +1,36 @@
+From a03f536f0dae3ca20e11b7c2ba41e4a7eb1f28c9 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Wed, 10 Oct 2012 11:15:39 +0100
+Subject: [PATCH] btrfs: Add an extended workaround for btrfs failures seen
+ with kernel 3.7.0.
+
+See:
+https://bugzilla.redhat.com/show_bug.cgi?id=863978
+and:
+http://thread.gmane.org/gmane.comp.file-systems.btrfs/20257
+
+This extends the fix in commit d9e5b514aa4ef6d659b267e8caef4ebec8a221b1
+because I missed the case where mkfs.btrfs is called directly.
+---
+ daemon/btrfs.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/daemon/btrfs.c b/daemon/btrfs.c
+index 8ecde01..8b80475 100644
+--- a/daemon/btrfs.c
++++ b/daemon/btrfs.c
+@@ -204,6 +204,11 @@ do_mkfs_btrfs (char *const *devices,
+     return -1;
+   }
+ 
++  /* Workaround for RHBZ#863978, possibly in kernel 3.7.0.  Can be
++   * fixed when we work out what's going on upstream.
++   */
++  sync_disks ();
++
+   free (err);
+   return 0;
+ }
+-- 
+1.7.10.4
+
diff --git a/libguestfs.spec b/libguestfs.spec
index d5eef50..97b11bf 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -22,7 +22,7 @@ Summary:       Access and modify virtual machine disk images
 Name:          libguestfs
 Epoch:         1
 Version:       1.19.49
-Release:       2%{?dist}
+Release:       3%{?dist}
 License:       LGPLv2+
 Group:         Development/Libraries
 URL:           http://libguestfs.org/
@@ -43,6 +43,9 @@ Patch2:        libguestfs-1.19.2-remove-udev-from-packagelist.patch
 # on i386 only.  This works around a bug in 32-bit qemu (RHBZ#857026).
 Patch3:        0001-i386-Add-noapic-flag-to-work-around-a-qemu-or-kernel.patch
 
+# Upstream patch to workaround btrfs problems with kernel 3.7.0.
+Patch4:        0001-btrfs-Add-an-extended-workaround-for-btrfs-failures-.patch
+
 %if 0%{?rhel} >= 7
 ExclusiveArch: x86_64
 %endif
@@ -694,6 +697,7 @@ autoreconf -i
 %endif
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 mkdir -p daemon/m4
 
@@ -1009,6 +1013,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
 
 
 %changelog
+* Wed Oct 10 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.49-3
+- Upstream patch to workaround btrfs problems with kernel 3.7.0.
+
 * Tue Oct 09 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.49-2
 - Install all libguestfs-live-service udev rules into /usr/lib/udev/rules.d.
 


More information about the scm-commits mailing list