Sparse file support in FreeBSD NFSv4.2 server
- Reply: Rick Macklem : "Re: Sparse file support in FreeBSD NFSv4.2 server"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 May 2025 22:29:59 UTC
Could you please implement sparse file support in the FreeBSD NFS server? Typical users are databases, High Performance Computing, Big Data, distributed systems and so on. Required are: - NFSv4.2 operation "SEEK", to list sections with data, and sections with holes - NFSv4.2 operation "ALLOCATE", to allocate disk space - NFSv4.2 operation "DEALLOCATE", to free/deallocate disk space, aka punching a hole (which does not alter a file's size) - NFSv4.2 operation "READPLUS", to read from sparse files. The returned data are a list of unions, each union either containing the block data, or the size of the hole - NFSv4.2 operation "WRITESAME", to fill (and thus allocate) files with repeated patterns (typical fill with zeros, or "empty pattern" for databases) Caveats: - Sparse files contain sections called "holes" which do not contain data, but for backwards compatibility read as 0x00 bytes. But valid data can contain long sequences of 0x00 bytes, which are NOT holes -- Aurélien