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

fix(mount): do not truncate shares not zfs mount #15660

Merged
merged 2 commits into from Jan 12, 2024
Merged

Conversation

stfl
Copy link
Contributor

@stfl stfl commented Dec 11, 2023

Motivation and Context

When running zfs share -a resetting the exports.d/zfs.exports makes sense to get a clean state.
Truncating was also called with zfs mount -a which would not populate the file again.

This was introduced with ede037c
Fixes: #15607

Description

only calling truncate with zfs share -a

How Has This Been Tested?

tested with running zfs mount -a and compared with the behavior of ZFS 2.1

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:

When running zfs share -a resetting the exports.d/zfs.exports makes
sense the get a clean state.
Truncating was also called with zfs mount which would not populate the
file again.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Dec 11, 2023
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for including a test, you just need to make sure it add it to the tests/runfiles/common.run.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 12, 2024
@behlendorf behlendorf merged commit 66670ba into openzfs:master Jan 12, 2024
19 of 25 checks passed
@stfl
Copy link
Contributor Author

stfl commented Jan 29, 2024

Thank you for merging this.

Since this is a regression, could you please include this in 2.2.3

Thank you.

@behlendorf behlendorf added this to Done in 2.2-release Jan 29, 2024
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jan 29, 2024
When running zfs share -a resetting the exports.d/zfs.exports makes
sense the get a clean state.
Truncating was also called with zfs mount which would not populate the
file again.
Add test to verify shares persist after mount -a.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Closes openzfs#15607 
Closes openzfs#15660
behlendorf pushed a commit that referenced this pull request Jan 29, 2024
When running zfs share -a resetting the exports.d/zfs.exports makes
sense the get a clean state.
Truncating was also called with zfs mount which would not populate the
file again.
Add test to verify shares persist after mount -a.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Closes #15607 
Closes #15660
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Mar 13, 2024
When running zfs share -a resetting the exports.d/zfs.exports makes
sense the get a clean state.
Truncating was also called with zfs mount which would not populate the
file again.
Add test to verify shares persist after mount -a.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Closes openzfs#15607 
Closes openzfs#15660
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Mar 13, 2024
When running zfs share -a resetting the exports.d/zfs.exports makes
sense the get a clean state.
Truncating was also called with zfs mount which would not populate the
file again.
Add test to verify shares persist after mount -a.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Closes openzfs#15607 
Closes openzfs#15660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
Development

Successfully merging this pull request may close these issues.

Re-export if zfs-mount.service failed
2 participants