|
From: | Chunyan Liu |
Subject: | Re: [Qemu-devel] [PATCHv2] qemu-img: set nocow flag to new file |
Date: | Mon, 18 Nov 2013 12:56:14 +0800 |
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.hhw/block/m25p80.c:219: Fehler: expected identifier before numeric constant
> 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
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
[Prev in Thread] | Current Thread | [Next in Thread] |