Linux NFS development
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: Cedric Blancher <cedric.blancher@gmail.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: NFSv4.2: How to deallocate a range of bytes in a file, aka "punch a hole"?
Date: Thu, 30 Nov 2023 07:45:19 -0500	[thread overview]
Message-ID: <2F13FCCD-8450-43DA-8C2D-0554BAA32037@redhat.com> (raw)
In-Reply-To: <CALXu0Uc9Q-i4TPVP4LQGfHcbpp-vwSL4a1xEzVuFxqDQwfbUCw@mail.gmail.com>

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


      reply	other threads:[~2023-11-30 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=2F13FCCD-8450-43DA-8C2D-0554BAA32037@redhat.com \
    --to=bcodding@redhat.com \
    --cc=cedric.blancher@gmail.com \
    --cc=linux-nfs@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