From: Richard Laager <rlaager@wiktel.com>
To: linux-fsdevel@vger.kernel.org
Subject: fallocate(FALLOC_FL_PUNCH_HOLE)
Date: Sat, 10 Mar 2012 14:07:05 -0600 [thread overview]
Message-ID: <1331410025.8577.68.camel@watermelon.coderich.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]
I've been working on a discard patch for QEMU.
I have a couple of questions about the semantics of fallocate()'s
FALLOC_FL_PUNCH_HOLE that are not addressed in the latest man-pages.git.
1. Upon successful return, are the results guaranteed to be on
stable storage?
1. If not, is fdatasync() sufficient, or is fsync()
required?
2. Does O_DSYNC on open() change any of this?
3. Does O_DIRECT on open() change any of this?
2. If I punch a hole in a previously preallocated range, is this...
A. required to undo the preallocation?
B. permitted, but not required, to undo the preallocation?
C. forbidden from undoing the preallocation?
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?
* so the filesystem can send a TRIM/UNMAP to an underlying SSD.
Thanks,
Richard
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2012-03-10 20:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-10 20:07 Richard Laager [this message]
2012-03-14 3:27 ` fallocate(FALLOC_FL_PUNCH_HOLE) Dave Chinner
2012-03-14 6:01 ` fallocate(FALLOC_FL_PUNCH_HOLE) Richard Laager
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=1331410025.8577.68.camel@watermelon.coderich.net \
--to=rlaager@wiktel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.