Received: from eggs.gnu.org ([2001:4830:134:3::10]:53905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgxuo-0006h8-2g for qemu-devel@nongnu.org; Thu, 14 Nov 2013 09:29:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgxuh-0007tM-UZ for qemu-devel@nongnu.org; Thu, 14 Nov 2013 09:29:02 -0500 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:48894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgxuh-0007tB-Np for qemu-devel@nongnu.org; Thu, 14 Nov 2013 09:28:55 -0500 Date: Thu, 14 Nov 2013 14:28:42 +0000 From: Alex Bligh Message-ID: <6E9B56F5DAF5B33BD1FAF8C0@nimrod.local> In-Reply-To: References: <1384416928-3441-1-git-send-email-cyliu@suse.com> <20131114091726.GA9755@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH] qemu-img: set nocow flag to new file Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh , Kevin Wolf , Chunyan Liu Cc: qemu-devel@nongnu.org, stefanha@redhat.com --On 14 November 2013 14:23:29 +0000 Alex Bligh 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 +#include + +#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