linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fallocate(FALLOC_FL_PUNCH_HOLE)
@ 2012-03-10 20:07 Richard Laager
  2012-03-14  3:27 ` fallocate(FALLOC_FL_PUNCH_HOLE) Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Laager @ 2012-03-10 20:07 UTC (permalink / raw)
  To: linux-fsdevel

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-14 12:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` fallocate(FALLOC_FL_PUNCH_HOLE) Richard Laager
2012-03-14 12:56   ` fallocate(FALLOC_FL_PUNCH_HOLE) Ted Ts'o

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