On Mon, Apr 20, 2026 at 08:39:51PM +0200, Roman Bogorodskiy wrote:
> FreeBSD 15.x updated posix_fallocate() to return EOPNOTSUPP
> instead of EINVAL when the operation is not supported.
> Quoting posix_fallocate(2):
> 
>      Previous versions of posix_fallocate used EINVAL to indicate that the
>      operation is not supported by the file system, as specified in IEEE Std
>      1003.1 (“POSIX.1”) Base Specifications, Issue 7.  IEEE Std 1003.1
>      (“POSIX.1”) Base Specifications, Issue 8 switched to requiring EOPNOTSUPP
>      for this error case.  ZFS adopted the latter convention in FreeBSD 15.0,
>      and the remaining filesystems in base adopted it in FreeBSD 15.1.
> 
> Update safezero_posix_fallocate() to handle this return value
> along with EINVAL to fix the waterfall down to safezero_slow()
> for filesystems that do not support that.
> 
> Signed-off-by: Roman Bogorodskiy <[email protected]>
> ---
>  src/util/virfile.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <[email protected]>

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|

Reply via email to