From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqfBa-0004gA-39 for qemu-devel@nongnu.org; Wed, 11 Dec 2013 03:30:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqfBU-0007X6-2F for qemu-devel@nongnu.org; Wed, 11 Dec 2013 03:30:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqfBT-0007Vz-QU for qemu-devel@nongnu.org; Wed, 11 Dec 2013 03:30:19 -0500 Date: Wed, 11 Dec 2013 09:29:54 +0100 From: Stefan Hajnoczi Message-ID: <20131211082954.GA31406@stefanha-thinkpad.muc.redhat.com> References: <1384416928-3441-1-git-send-email-cyliu@suse.com> <20131115093846.GJ12545@stefanha-thinkpad.redhat.com> <20131118095746.GA16693@stefanha-thinkpad.redhat.com> <871u1ke46s.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <871u1ke46s.fsf@linaro.org> Content-Transfer-Encoding: quoted-printable 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: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: Kevin Wolf , Stefan Hajnoczi , Chunyan Liu , qemu-devel@nongnu.org On Tue, Dec 10, 2013 at 10:23:41PM +0000, Alex Benn=E9e wrote: >=20 > stefanha@redhat.com writes: >=20 > > On Mon, Nov 18, 2013 at 12:54:59PM +0800, Chunyan Liu wrote: > >> 2013/11/15 Stefan Hajnoczi > >>=20 > >> > On Thu, Nov 14, 2013 at 04:15:28PM +0800, Chunyan Liu wrote: > >> > > Set NOCOW flag to newly created images to solve performance issu= es 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-writ= e and > >> > snapshot features of the file system. We shouldn't silently disab= le > >> > 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 avo= id > > 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=3Don test.img 8G # file has NOCOW set >=20 > 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. A warning could help or at least prompt users to consider switching to nocow. Stefan