summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-10-08 22:25:43 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-10-09 11:09:17 +0100
commitd9e5b514aa4ef6d659b267e8caef4ebec8a221b1 (patch)
treebcdc6d6102f89513598543857a189f54572c374d /daemon
parent45c9fbd6f50eeed9307892e883b25b8b3b263b3a (diff)
downloadlibguestfs-d9e5b514aa4ef6d659b267e8caef4ebec8a221b1.tar.gz
libguestfs-d9e5b514aa4ef6d659b267e8caef4ebec8a221b1.tar.xz
libguestfs-d9e5b514aa4ef6d659b267e8caef4ebec8a221b1.zip
btrfs: Add a 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
Diffstat (limited to 'daemon')
-rw-r--r--daemon/mkfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/daemon/mkfs.c b/daemon/mkfs.c
index 4b2ea10b..d472450e 100644
--- a/daemon/mkfs.c
+++ b/daemon/mkfs.c
@@ -192,6 +192,13 @@ do_mkfs (const char *fstype, const char *device, int blocksize,
}
free (err);
+
+ /* Workaround for RHBZ#863978, possibly in kernel 3.7.0. Can be
+ * fixed when we work out what's going on upstream.
+ */
+ if (STREQ (fstype, "btrfs"))
+ sync_disks ();
+
return 0;
}