Upstream patch to workaround btrfs problems with kernel 3.7.0.

This commit is contained in:
Richard W.M. Jones 2012-10-10 11:18:46 +01:00
parent e657811a30
commit 2c9869b951
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From a03f536f0dae3ca20e11b7c2ba41e4a7eb1f28c9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@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

View File

@ -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@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@redhat.com> - 1:1.19.49-2
- Install all libguestfs-live-service udev rules into /usr/lib/udev/rules.d.