Linux NFS development
 help / color / mirror / Atom feed
* NFSv4.2: How to deallocate a range of bytes in a file, aka "punch a hole"?
@ 2023-11-30 10:18 Cedric Blancher
  2023-11-30 12:45 ` Benjamin Coddington
  0 siblings, 1 reply; 2+ messages in thread
From: Cedric Blancher @ 2023-11-30 10:18 UTC (permalink / raw)
  To: Linux NFS Mailing List

Good morning!

Linux has fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, ...)
to punch a hole into a file, i.e. deallocate the blocks given and make
the file a "sparse file".

But how is this implemented on NFSv4.2 COMPOUND level? How does a
NFSv4 compound look like to punch a hole say from position 30000 to
position 35721?

Ced
-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

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

* Re: NFSv4.2: How to deallocate a range of bytes in a file, aka "punch a hole"?
  2023-11-30 10:18 NFSv4.2: How to deallocate a range of bytes in a file, aka "punch a hole"? Cedric Blancher
@ 2023-11-30 12:45 ` Benjamin Coddington
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Coddington @ 2023-11-30 12:45 UTC (permalink / raw)
  To: Cedric Blancher; +Cc: Linux NFS Mailing List

On 30 Nov 2023, at 5:18, Cedric Blancher wrote:

> Good morning!
>
> Linux has fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, ...)
> to punch a hole into a file, i.e. deallocate the blocks given and make
> the file a "sparse file".
>
> But how is this implemented on NFSv4.2 COMPOUND level? How does a
> NFSv4 compound look like to punch a hole say from position 30000 to
> position 35721?

Are you interested in the current linux client's implementation?  You could
look at a wire capture of the operation to find out.

Its going to be something like PUTFH, DEALLOCATE, GETATTR..

Ben


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

end of thread, other threads:[~2023-11-30 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 10:18 NFSv4.2: How to deallocate a range of bytes in a file, aka "punch a hole"? Cedric Blancher
2023-11-30 12:45 ` Benjamin Coddington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox