linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Laager <rlaager@wiktel.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: fallocate(FALLOC_FL_PUNCH_HOLE)
Date: Wed, 14 Mar 2012 01:01:15 -0500	[thread overview]
Message-ID: <1331704875.24052.810.camel@watermelon.coderich.net> (raw)
In-Reply-To: <20120314032709.GW3592@dastard>

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

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?
> 
> 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.

-- 
Richard

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-03-14  6:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-10 20:07 fallocate(FALLOC_FL_PUNCH_HOLE) Richard Laager
2012-03-14  3:27 ` fallocate(FALLOC_FL_PUNCH_HOLE) Dave Chinner
2012-03-14  6:01   ` Richard Laager [this message]
2012-03-14 12:56   ` fallocate(FALLOC_FL_PUNCH_HOLE) Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331704875.24052.810.camel@watermelon.coderich.net \
    --to=rlaager@wiktel.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).