-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Make the vfs.zfs.vdev.raidz_impl sysctl cross-platform #16980
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
Conversation
Signed-off-by: Alan Somers <[email protected]> Sponsored by: ConnectWise
Signed-off-by: Alan Somers <[email protected]>
f27d84f
to
6a214e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you are stil changing the behavior on Linus by using param_get_charp()
instead of vdev_raidz_impl_get()
before. I am not sure it is possible to drop the zfs_vdev_raidz_impl
variable completely with existing macros, but I don't think it is really needed here.
Yes, exactly. The existing macros seem to require that variable. |
But nobody should force you to use it, if as I understand in this case arbitrary string needs to be produced. |
Instead, define the FreeBSD and Linux sysctls separately. Signed-off-by: Alan Somers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was an unexpected move.
Umm, what was unexpected? |
Splitting the tunable into two completely separate for FreeBSD and Linux. You just missed one function, but decided to turn 180 degrees and go other direction. |
Well, what would you like for me to do? |
I was thinking you replace |
This reverts commit ba180bd.
Signed-off-by: Alan Somers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-by: Allan Jude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objections, but asking myself how hard should we push cross-platform implementation for procedural parameters. It would be good, but use existing set of macros for it seemed pretty messy when Alan tried.
Signed-off-by: Alan Somers<[email protected]>
The latest push returns to using the cross-platform macro. I'm ok with committing either version. |
Signed-off-by: Alan Somers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to rename zfs_vdev_raidz_impl
into zfs_vdev_raidz_impl_setting
and add separate zfs_vdev_raidz_impl
. Just leave them as they were. As I understand Linux will pass the argument to the get/set methods, which you may use or not. I wonder if it could be passed on FreeBSD also, so that we could avoid global symbol.
The ZFS_MODULE_PARAM_CALL macro still requires a symbol by this name, but apparently doesn't care about its type. Signed-off-by: Alan Somers <[email protected]>
@asomers Take a note of checkstype error: |
Signed-off-by: Alan Somers <[email protected]>
Signed-off-by: Alan Somers <[email protected]>
Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Alan Somers <[email protected]> Sponsored by: ConnectWise Closes openzfs#16980
Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Alan Somers <[email protected]> Sponsored by: ConnectWise Closes openzfs#16980
Signed-off-by: Alan Somers [email protected]
Sponsored by: ConnectWise
Motivation and Context
It creates a
vfs.zfs.vdev.raidz_impl
sysctl on FreeBSD, so the implementation can be queried or changed.Description
Replace the Linux-specific
module_param_call
andMODULE_PARM_DESC
with the portableZFS_MODULE_PARAM_CALL
.How Has This Been Tested?
Tested on FreeBSD. Tried creating pools with every available raidz_impl testing. On Linux, compile-tested only.
Types of changes
Checklist:
Signed-off-by
.