qemu-devel
[Top][All Lists]
Advanced

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

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


From: Alex Bligh
Subject: Re: [Qemu-devel] [PATCH] qemu-img: set nocow flag to new file
Date: Thu, 14 Nov 2013 14:28:42 +0000



--On 14 November 2013 14:23:29 +0000 Alex Bligh <address@hidden> wrote:

Also, given FS_NOCOW_FL was only introduced in 2.6.39, should this not
be guarded by
 #ifdef FS_NOCOW_FL
(or better tested in configure in case it becomes something other than
a #define in which case this test could replace #ifdef __linux__)

Apologies - I missed this hunk:

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


--
Alex Bligh



reply via email to

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