[Bug 286548] zfs: zpool feature flags plus old filesystem version result in zero-size symlinks

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 03 May 2025 15:33:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286548

            Bug ID: 286548
           Summary: zfs: zpool feature flags plus old filesystem version
                    result in zero-size symlinks
           Product: Base System
           Version: 14.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: d8zNeCFG@aon.at

Scenario:
- FreeBSD stable/14, ca. February 2025; also openSUSE Tumbleweed 15.6
- Creating a new zpool (on FreeBSD)
- zfs send -R | zfs receive -Fuv a filesystem tree from a version 28 zpool, the
filesystems are version 3 (latest is 5)

Result:
- Creating symlinks with a length of more than ca. 60 bytes results in a
zero-sized symlink (readlink returns 0 bytes)

Expected result:
- Creating symlinks should always work
- If there is an incompatibility between pool version, feature flags, and
filesystem versions, a warning should be printed (kernel message to syslog when
importing the pool, for each filesystem in the imported pool.

Resolution:
- zpool upgrade shows that the new zpool is up to date.
- zfs upgrade shows that some filesystems can be upgraded, amongst them the
affected one.
- Run zfs upgrade on the affected filesystems.

Note:
- The pools are shared between (dual boot) openSUSE Leap 15.6 and FreeBSD
stable/14. The behavior (bug) was the same on both systems.

Interestingly, a search for "openzfs empty symlink" or "openzfs zero size
symlink" did not turn up anything of interest. Maybe this bug report changes
that. ;-)

This should probably go to openzfs.org.

-- Martin

-- 
You are receiving this mail because:
You are the assignee for the bug.