From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Laager Subject: Re: fallocate(FALLOC_FL_PUNCH_HOLE) Date: Wed, 14 Mar 2012 01:01:15 -0500 Message-ID: <1331704875.24052.810.camel@watermelon.coderich.net> References: <1331410025.8577.68.camel@watermelon.coderich.net> <20120314032709.GW3592@dastard> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-zqc2/1f3zEdHJ/eh7qDK" Cc: linux-fsdevel@vger.kernel.org To: Dave Chinner Return-path: Received: from spam1.wiktel.com ([69.89.207.151]:58022 "EHLO spam1.wiktel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755328Ab2CNGB1 (ORCPT ); Wed, 14 Mar 2012 02:01:27 -0400 In-Reply-To: <20120314032709.GW3592@dastard> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --=-zqc2/1f3zEdHJ/eh7qDK Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2012-03-14 at 14:27 +1100, Dave Chinner wrote: > On Sat, Mar 10, 2012 at 02:07:05PM -0600, Richard Laager wrote: > > If the answer to #2 is not C, it would appear there's no atomic way to > > indicate that I'm done with certain data* but I want the filesystem to > > continue to guarantee space for me. Is this correct? >=20 > Not through fallocate() right now. XFS has an ioctl that will turn > written ranges and holes back into preallocated space: > XFS_IOC_ZERO_RANGE. Do filesystems generally track the data necessary to tell the difference between fallocate() + write() and just a regular write()? If so, it might be nice for applications to be able to say "I'm done with this data" and effectively "undo" the write(). In other words, the space would return to being unallocated or preallocated, whichever it was originally. I suspect they don't track preallocation of data ranges once they're filled with data. So, for example, QEMU will have to be told whether the administrator wants thin (i.e. use PUNCH_HOLE) or thick (i.e. use ZERO_RANGE) provisioning. --=20 Richard --=-zqc2/1f3zEdHJ/eh7qDK 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) iEYEABECAAYFAk9gNCUACgkQbfU6uV4fG85BoACgg9Ca/FpIkE9lRiCd1svHZpOD B84AoNoEa0JgJXd10XqES0ShwktpMMhU =/TJK -----END PGP SIGNATURE----- --=-zqc2/1f3zEdHJ/eh7qDK--