Bug 286548 - zfs: zpool feature flags plus old filesystem version result in zero-size symlinks
Summary: zfs: zpool feature flags plus old filesystem version result in zero-size syml...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-03 15:33 UTC by Martin Birgmeier
Modified: 2025-05-11 10:40 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2025-05-03 15:33:51 UTC
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
Comment 1 Alan Somers freebsd_committer freebsd_triage 2025-05-05 21:09:01 UTC
Yes.  Please report this issue to https://github.com/openzfs/zfs/issues too.
Comment 2 Martin Birgmeier 2025-05-06 17:03:01 UTC
(In reply to Alan Somers from comment #1)

I do not have a github account and would appreciate if you could do it instead.

-- Martin
Comment 3 Alan Somers freebsd_committer freebsd_triage 2025-05-06 22:06:07 UTC
(In reply to Martin Birgmeier from comment #2)
No, I can't.  That is, I could certainly create the issue.  But afterwards OpenZFS's maintainers would try to ask questions of the OP, propose workarounds, offer patches, etc.  And I wouldn't be able to help them.  That's why you need to create the issue yourself.