Received: from eggs.gnu.org ([2001:4830:134:3::10]:48784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhLXO-000850-4N for qemu-devel@nongnu.org; Fri, 15 Nov 2013 10:42:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VhLXJ-0004EP-5b for qemu-devel@nongnu.org; Fri, 15 Nov 2013 10:42:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhLXI-0004EG-U9 for qemu-devel@nongnu.org; Fri, 15 Nov 2013 10:42:21 -0500 Date: Fri, 15 Nov 2013 16:42:17 +0100 From: Kevin Wolf Message-ID: <20131115154217.GC3092@dhcp-200-207.str.redhat.com> References: <1384491687-6079-1-git-send-email-cyliu@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1384491687-6079-1-git-send-email-cyliu@suse.com> Subject: Re: [Qemu-devel] [PATCHv2] qemu-img: set nocow flag to new file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chunyan Liu Cc: qemu-devel@nongnu.org, stefanha@redhat.com Am 15.11.2013 um 06:01 hat Chunyan Liu geschrieben: > Set NOCOW flag to newly created images to solve performance issues on btrfs. > > Btrfs has terrible performance when hosting VM images, even more when the guest > in those VM are also using btrfs as file system. One way to mitigate this bad > performance is to turn off COW attributes on VM files (since having copy on > write for this kind of data is not useful). > > Signed-off-by: Chunyan Liu > diff --git a/include/qemu-common.h b/include/qemu-common.h > index 5054836..fe7dd9b 100644 > --- a/include/qemu-common.h > +++ b/include/qemu-common.h > @@ -50,6 +50,15 @@ > #include "sysemu/os-posix.h" > #endif > > +#ifdef __linux__ > +#include > +#include > + > +#ifndef FS_NOCOW_FL > +#define FS_NOCOW_FL 0x00800000 /* Do not cow file */ > +#endif > +#endif > + > #ifndef O_LARGEFILE > #define O_LARGEFILE 0 > #endif hw/block/m25p80.c:219: Fehler: expected identifier before numeric constant On RHEL 6, there seems to be a naming conflict for READ, which is present in linux/fs.h and used as a local enum value by m25p80.c. Kevin