From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCFml-0001jR-3j for qemu-devel@nongnu.org; Mon, 26 Mar 2012 15:41:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCFmi-00043T-Gm for qemu-devel@nongnu.org; Mon, 26 Mar 2012 15:40:58 -0400 Received: from spam4.wiktel.com ([69.89.207.154]:37058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCFmi-00041S-As for qemu-devel@nongnu.org; Mon, 26 Mar 2012 15:40:56 -0400 From: Richard Laager In-Reply-To: <20120324152721.GA13014@lst.de> References: <1331226917-6658-1-git-send-email-pbonzini@redhat.com> <1331226917-6658-7-git-send-email-pbonzini@redhat.com> <4F5A31B2.3050701@redhat.com> <4F5A46A1.4000508@redhat.com> <1331402560.8577.46.camel@watermelon.coderich.net> <20120324152721.GA13014@lst.de> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-NWBJg1Mme9iFtlQHzKgq" Date: Mon, 26 Mar 2012 14:40:47 -0500 Message-ID: <1332790847.3486.26.camel@watermelon.coderich.net> Mime-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org --=-NWBJg1Mme9iFtlQHzKgq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2012-03-24 at 16:27 +0100, Christoph Hellwig wrote: > > has_discard =3D !fallocate(s->fd, FALLOC_FL_PUNCH_HOLE | FALLOC= _FL_KEEP_SIZE, >=20 > There is no point in using FALLOC_FL_KEEP_SIZE together with > FALLOC_FL_PUNCH_HOLE. It's *required*. From the man page [0], "The FALLOC_FL_PUNCH_HOLE flag must be ORed with FALLOC_FL_KEEP_SIZE in mode;" [0] http://man7.org/linux/man-pages/man2/fallocate.2.html --=20 Richard --=-NWBJg1Mme9iFtlQHzKgq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk9wxjkACgkQbfU6uV4fG85SywCgjAvWAQStr7kGaKnL1GZldYxo bMcAoIncK5lbsKpdkYqIeB9PDRYYnoUc =KCYu -----END PGP SIGNATURE----- --=-NWBJg1Mme9iFtlQHzKgq--