Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initramfs: Fix legacy mountpoint rootfs #14274

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

ghost
Copy link

@ghost ghost commented Dec 9, 2022

Motivation and Context

Legacy mountpoint datasets should not pass -o zfsutil to mount.zfs. The logic in the zfs initramfs script for this is broken because a reused variable is overwritten. This prevents booting systems where the root fs dataset has mountpoint=legacy.

Description

Fix the logic in mount_fs() to not forget we have a legacy mountpoint when checking for an org.zol:mountpoint userprop.

How Has This Been Tested?

Booted a VM with it.

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)
  • 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:

Legacy mountpoint datasets should not pass `-o zfsutil` to `mount.zfs`.
Fix the logic in `mount_fs()` to not forget we have a legacy mountpoint
when checking for an `org.zol:mountpoint` userprop.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
@ghost ghost added Status: Code Review Needed Ready for review and testing Component: Userspace user space functionality labels Dec 9, 2022
@behlendorf behlendorf merged commit 786ff6a into openzfs:master Dec 12, 2022
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 12, 2022
@ghost ghost deleted the initramfs-legacy branch December 12, 2022 18:25
ghost pushed a commit to truenas/zfs that referenced this pull request Dec 12, 2022
Legacy mountpoint datasets should not pass `-o zfsutil` to `mount.zfs`.
Fix the logic in `mount_fs()` to not forget we have a legacy mountpoint
when checking for an `org.zol:mountpoint` userprop.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#14274
(cherry picked from commit 786ff6a)
@ghost ghost mentioned this pull request Dec 12, 2022
13 tasks
behlendorf pushed a commit that referenced this pull request Dec 14, 2022
Legacy mountpoint datasets should not pass `-o zfsutil` to `mount.zfs`.
Fix the logic in `mount_fs()` to not forget we have a legacy mountpoint
when checking for an `org.zol:mountpoint` userprop.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #14274
(cherry picked from commit 786ff6a)
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Dec 17, 2022
Legacy mountpoint datasets should not pass `-o zfsutil` to `mount.zfs`.
Fix the logic in `mount_fs()` to not forget we have a legacy mountpoint
when checking for an `org.zol:mountpoint` userprop.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#14274
@mlow
Copy link

mlow commented Feb 7, 2023

This change seems to have broke the ability to mount root fs datasets where mountpoint=none for me.. No problems booting my debian system on 2.1.7, but had to change to mountpoint=legacy on 2.1.8.

@ghost
Copy link
Author

ghost commented Feb 7, 2023

This was just fixed in master: #14455
I'll open a PR to merge it for 2.1.10
#14473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Userspace user space functionality Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants