From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqViZ-0002gJ-Bj for qemu-devel@nongnu.org; Tue, 10 Dec 2013 17:23:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqViT-00066M-D0 for qemu-devel@nongnu.org; Tue, 10 Dec 2013 17:23:51 -0500 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:39056 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqViT-00066G-7C for qemu-devel@nongnu.org; Tue, 10 Dec 2013 17:23:45 -0500 References: <1384416928-3441-1-git-send-email-cyliu@suse.com> <20131115093846.GJ12545@stefanha-thinkpad.redhat.com> <20131118095746.GA16693@stefanha-thinkpad.redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= Message-ID: <871u1ke46s.fsf@linaro.org> In-reply-to: <20131118095746.GA16693@stefanha-thinkpad.redhat.com> Date: Tue, 10 Dec 2013 22:23:41 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] qemu-img: set nocow flag to new file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Stefan Hajnoczi , Chunyan Liu , qemu-devel@nongnu.org stefanha@redhat.com writes: > On Mon, Nov 18, 2013 at 12:54:59PM +0800, Chunyan Liu wrote: >> 2013/11/15 Stefan Hajnoczi >> >> > On Thu, Nov 14, 2013 at 04:15:28PM +0800, Chunyan Liu wrote: >> > > Set NOCOW flag to newly created images to solve performance issues on >> > btrfs. >> > This should be optional and I'm not sure it should be the default. >> > >> > Rationale: If you're on btrfs you probably expect the copy-on-write and >> > snapshot features of the file system. We shouldn't silently disable >> > that unless the user asks for it. > > When the NOCOW attribute is set on a file, reflink copying (aka > file-level snapshots) do not work: > > $ cp --reflink test.img test-snapshot.img > > This produces EINVAL. > > It is a regression if qemu-img create suddenly starts breaking this > standard btrfs feature for existing users. > > Please make it a .bdrv_create() option which is off by default to avoid > breaking existing users' workflows/scripts. The result should be > something like: > > $ qemu-img create test.img 8G # file has NOCOW cleared > $ qemu-img create -o nocow=on test.img 8G # file has NOCOW set I agree we shouldn't break existing work flows. I wonder if it would OK for qemu-img to issue a warning (when not --quiet) when it detects creation of an image on a partition where performance may not be as expected due to COW behaviour. Cheers, -- Alex Bennée QEMU/KVM Hacker for Linaro