HomeFreeBSD

MFV r271518:

Description

MFV r271518:

Correctly report hole at end of file.

When asked to find a hole, the DMU sees that there are no holes in the
object, and returns ESRCH. The ZPL interprets this as "no holes before
the end of the file", and therefore inserts the "virtual hole" at the
end of the file. Because DMU and ZPL have different ideas of where the
end of an object/file is, we will end up returning the end of file,
which is generally larger, instead of returning the end of object.

The fix is to handle the "virtual hole" in the DMU. If no hole is found,
the DMU will return a hole at the end of the file, rather than an error.

Illumos issue:

5139 SEEK_HOLE failed to report a hole at end of file

MFC after: 1 week

Details

Provenance
delphijAuthored on
Parents
rS271535: Make inclusion of fdt clock support conditional on fdt_clock, not just fdt.
Branches
Unknown
Tags
Unknown

Event Timeline