Re: NFSv4.2 READ_PLUS support?

From: Freddie Cash <fjwcash_at_gmail.com>
Date: Tue, 26 Aug 2025 15:45:15 UTC
From your link, this page specifically:
https://pubs.opengroup.org/onlinepubs/9799919799/

A hole is a contiguous region of bytes within a file, all having the value
of zero.

Definition of a hole from here:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html

A contiguous region of bytes within a file, all having the value of zero.

Sounds like POSIX treats a hole in a file as a stream of 0x00 bytes.

On Tue, Aug 26, 2025 at 6:32 AM Aurélien Couderc <
aurelien.couderc2002@gmail.com> wrote:

> On Mon, Aug 25, 2025 at 1:45 PM Dag-Erling Smørgrav <des@freebsd.org>
> wrote:
> >
> > "Rob Norris" <robn@despairlabs.com> writes:
> > > Cedric Blancher <cedric.blancher@gmail.com> writes:
> > > > Holes are not sequences of 0x00 bytes. Holes means "no data here".
> ZFS
> > > > compression should preserve the sparse information, otherwise you
> turn
> > > > ANY sequence of 0x00 bytes into holes,and that will break databases
> > > > and other applications which depend on exactly that *precise*
> > > > semantics.
> > > This is the second time I've heard this on this list (previously[1])
> but
> > > I don't know what it's referring to.
> >
> > They made it up.
>
> Nobody made that up. It's reality, even defined by POSIX, IETF NFS and
> the UNIX greybeards, long ago
>
> > A hole is just an optimization, and it is 100% up to
> > the file system whether holes are created and where.  Any application
> > that considers a hole to be semantically different from a sequence of
> > zeroes is broken.
>
> No, this is part of POSIX (e.g.
> https://pubs.opengroup.org/onlinepubs/9799919799/ ff), *AND*
> traditional UNIX filesystem behaviour.
>
> As pointed out, changing hold to 0x00 bytes is bad, as it breaks
> existing applications (usually databases and scientific applications),
>
> Aurélien
> --
> Aurélien Couderc <aurelien.couderc2002@gmail.com>
> Big Data/Data mining expert, chess enthusiast
>
>

-- 
Freddie Cash
fjwcash@gmail.com