Skip to content

FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI #12052

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

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

jharmening
Copy link
Contributor

VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate
whether it has changed the busy state of the mount. The filesystem
may still assume that its .vfs_quotactl entrypoint is always called
with the mount busied, but only needs to unbusy the mount (and clear
*mp_busy) if it does something that actually requires the mount to be
unbusied. It no longer needs to blindly copy-paste the UFS protocol
for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands.

Motivation and Context

Decouples per-filesystem quotactl() implementations from UFS-specific rules.
ZFS portion chases https://reviews.freebsd.org/D30218 and must land in lockstep

Description

How Has This Been Tested?

build and basic functional testing on FreeBSD-current/amd64

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:

@behlendorf behlendorf requested review from amotin and a user May 26, 2021 01:53
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label May 26, 2021
@jharmening jharmening force-pushed the freebsd_quotactl_busy branch from 76a81fa to 87a1414 Compare May 26, 2021 02:20
@ghost
Copy link

ghost commented May 26, 2021

I'll defer to the other FreeBSD reviewers on Phabricator as far as the VFS part is concerned. Let's be sure get it committed to FreeBSD first (it's fine to commit the ZFS changes in FreeBSD first, as long as we're following through with the upstreaming PR here) to make sure we have the FreeBSD version number locked in. Then we can safely upstream the ZFS portion here.

@jharmening jharmening force-pushed the freebsd_quotactl_busy branch from abf41e2 to fe649e2 Compare May 29, 2021 21:09
VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate
whether it has changed the busy state of the mount.  The filesystem
may still assume that its .vfs_quotactl entrypoint is always called
with the mount busied, but only needs to unbusy the mount (and clear
*mp_busy) if it does something that actually requires the mount to be
unbusied.  It no longer needs to blindly copy-paste the UFS protocol
for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands.

Signed-off-by: Jason Harmening <jason.harmening@gmail.com>
@jharmening
Copy link
Contributor Author

jharmening commented Jun 1, 2021

I'll defer to the other FreeBSD reviewers on Phabricator as far as the VFS part is concerned. Let's be sure get it committed to FreeBSD first (it's fine to commit the ZFS changes in FreeBSD first, as long as we're following through with the upstreaming PR here) to make sure we have the FreeBSD version number locked in. Then we can safely upstream the ZFS portion here.

Committed to FreeBSD in freebsd/freebsd-src@a4b07a2701f5. ZFS changes should be identical to what's posted here.

@ghost ghost mentioned this pull request Jun 4, 2021
13 tasks
@ghost
Copy link

ghost commented Jun 4, 2021

This should fix the build failures on FreeBSD main we've started seeing today.

@jharmening
Copy link
Contributor Author

This should fix the build failures on FreeBSD main we've started seeing today.

What needs to happen for it to get merged? I don't have sufficient privilege to do that myself.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jun 4, 2021
@behlendorf
Copy link
Contributor

@tonynguien the CI failures here are unrelated, this is ready to go when you get a chance.

@tonynguien tonynguien merged commit 8dddb25 into openzfs:master Jun 4, 2021
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 8, 2021
VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate
whether it has changed the busy state of the mount.  The filesystem
may still assume that its .vfs_quotactl entrypoint is always called
with the mount busied, but only needs to unbusy the mount (and clear
*mp_busy) if it does something that actually requires the mount to be
unbusied.  It no longer needs to blindly copy-paste the UFS protocol
for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Jason Harmening <jason.harmening@gmail.com>
Closes openzfs#12052
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 9, 2021
VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate
whether it has changed the busy state of the mount.  The filesystem
may still assume that its .vfs_quotactl entrypoint is always called
with the mount busied, but only needs to unbusy the mount (and clear
*mp_busy) if it does something that actually requires the mount to be
unbusied.  It no longer needs to blindly copy-paste the UFS protocol
for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Jason Harmening <jason.harmening@gmail.com>
Closes openzfs#12052
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jun 15, 2021
VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate
whether it has changed the busy state of the mount.  The filesystem
may still assume that its .vfs_quotactl entrypoint is always called
with the mount busied, but only needs to unbusy the mount (and clear
*mp_busy) if it does something that actually requires the mount to be
unbusied.  It no longer needs to blindly copy-paste the UFS protocol
for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Jason Harmening <jason.harmening@gmail.com>
Closes openzfs#12052
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jun 16, 2021
VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate
whether it has changed the busy state of the mount.  The filesystem
may still assume that its .vfs_quotactl entrypoint is always called
with the mount busied, but only needs to unbusy the mount (and clear
*mp_busy) if it does something that actually requires the mount to be
unbusied.  It no longer needs to blindly copy-paste the UFS protocol
for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Jason Harmening <jason.harmening@gmail.com>
Closes openzfs#12052
tonyhutter pushed a commit that referenced this pull request Jun 23, 2021
VFS_QUOTACTL(9) has been updated to allow each filesystem to indicate
whether it has changed the busy state of the mount.  The filesystem
may still assume that its .vfs_quotactl entrypoint is always called
with the mount busied, but only needs to unbusy the mount (and clear
*mp_busy) if it does something that actually requires the mount to be
unbusied.  It no longer needs to blindly copy-paste the UFS protocol
for calling vfs_unbusy(9) for the Q_QUOTAOFF and Q_QUOTAON commands.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Jason Harmening <jason.harmening@gmail.com>
Closes #12052
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants