Skip to content

short path for "zfs/zpool upgrade -v" befor libzfs_init#18694

Open
tiehexue wants to merge 1 commit into
openzfs:masterfrom
tiehexue:zpool-zfs-upgrade-v-no-kernel
Open

short path for "zfs/zpool upgrade -v" befor libzfs_init#18694
tiehexue wants to merge 1 commit into
openzfs:masterfrom
tiehexue:zpool-zfs-upgrade-v-no-kernel

Conversation

@tiehexue

@tiehexue tiehexue commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

In freebsd, there will no kernel auto-load for this two commands. zpool upgrade still need kernel
in linux. Refer to #18593 for more details.

Description

Just move the two commands before libzfs_init.

How Has This Been Tested?

Tested locally with strace/truss.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

In freebsd, there will no kernel auto-load for this
two commands. zpool upgrade still need kernel
in linux.

Signed-off-by: tiehexue <tiehexue@hotmail.com>
@tiehexue tiehexue force-pushed the zpool-zfs-upgrade-v-no-kernel branch from 9ee6596 to 3c971d9 Compare June 21, 2026 13:13
@robn

robn commented Jun 21, 2026

Copy link
Copy Markdown
Member

As far as I can tell, the only reason the kernel module isn't interrogated for feature information on FreeBSD is because the zfs_mod_list_ functions are just stub implementations. The effect of that is that upgrade -v shows the features of the userspace tools only, even if the kernel doesn't support them.

If that's so, that makes the whole premise of this change wrong. It's not that upgrade -v doesn't need the kernel module, but just that the kernel side is not fully implemented. If anyone ever does complete that implementation, this workaround will have to be removed, and we'll be back where we started.

All that aside, I don't actually understand what this carveout would accomplish anyway. You call zpool upgrade -v, the kernel module isn't loaded... and then what?

@robn robn added the Status: Design Review Needed Architecture or design is under discussion label Jun 21, 2026
@tiehexue

Copy link
Copy Markdown
Contributor Author

Yes, I also have some questions. 1) does FreeBSD community even know that "zpool upgrade -v" is not actually implemented? It just return B_TRUE for all features. 2) why do they call it in a base line scanning tool? 3) Should we implement this command in users pace, and move Linux implementation back too? I guess it is doable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Design Review Needed Architecture or design is under discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants