qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2] qemu-img: set nocow flag to new file


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCHv2] qemu-img: set nocow flag to new file
Date: Fri, 15 Nov 2013 16:42:17 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>

> 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 <linux/fs.h>
> +#include <sys/ioctl.h>
> +
> +#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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]