Do not return ESTALE for open-unlinked files

When the Linux fh_to_dentry() export operation is called for an 
open-unlinked file on a ZFS filesystem, an ESTALE error is returned. 
This behavior differs from other filesystem implementations on Linux 
(like eg. ext4, XFS), which grant access to inodes that are unlinked 
but still referenced. Update both the Linux and FreeBSD code to 
conform with the established Linux behavior.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: tiehexue <tiehexue@hotmail.com>
Closes #18699 
Closes #18718
12 files changed
tree: 27fc26bf29bef73b887d773b1ecec66c93090fae
  1. .github/
  2. cmd/
  3. config/
  4. contrib/
  5. etc/
  6. include/
  7. lib/
  8. man/
  9. module/
  10. rpm/
  11. scripts/
  12. tests/
  13. udev/
  14. .editorconfig
  15. .gitignore
  16. .gitmodules
  17. .mailmap
  18. AUTHORS
  19. autogen.sh
  20. CODE_OF_CONDUCT.md
  21. configure.ac
  22. copy-builtin
  23. COPYRIGHT
  24. LICENSE
  25. Makefile.am
  26. META
  27. NEWS
  28. NOTICE
  29. README.md
  30. RELEASES.md
  31. TEST
  32. zfs.release.in
README.md

img

OpenZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community. This repository contains the code for running OpenZFS on Linux and FreeBSD.

codecov coverity

Official Resources

Installation

Full documentation for installing OpenZFS on your favorite operating system can be found at the Getting Started Page.

Contribute & Develop

We have a separate document with contribution guidelines.

We have a Code of Conduct.

Release

OpenZFS is released under a CDDL license. For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197

Supported Kernels and Distributions

Linux

Given the wide variety of Linux environments, we prioritize development and testing on stable, supported kernels and distributions.

Kernel (kernel.org)

All longterm kernels from kernel.org are supported. stable kernels are usually supported in the next OpenZFS release.

Supported longterm kernels: 6.18, 6.12, 6.6, 6.1, 5.15, 5.10.

Red Hat Enterprise Linux (RHEL)

All RHEL (and compatible systems: AlmaLinux OS, Rocky Linux, etc) on the full or maintenance support tracks are supported.

Supported RHEL releases: 8.10, 9.7, 10.1.

Ubuntu

All Ubuntu LTS releases are supported.

Supported Ubuntu releases: 26.04 “Resolute”, 24.04 “Noble”, 22.04 “Jammy”.

Debian

All Debian stable and LTS releases are supported.

Supported Debian releases: 13 “Trixie”, 12 “Bookworm”, 11 “Bullseye”.

Other Distributions

Generally, if a distribution is following an LTS kernel, it should work well with OpenZFS.

FreeBSD

All FreeBSD releases receiving security support are supported by OpenZFS.

Supported FreeBSD releases: 15.1, 14.4.