Page MenuHomeFreeBSD

zfs: drop duplicate vfs.zfs.metaslab.condense_pct sysctl
Needs ReviewPublic

Authored by chris.longros_gmail.com on Sun, Jun 21, 10:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 18, 8:55 AM
Unknown Object (File)
Thu, Jul 16, 4:08 AM
Unknown Object (File)
Thu, Jul 9, 5:14 AM
Unknown Object (File)
Sat, Jul 4, 6:20 AM
Unknown Object (File)
Mon, Jun 29, 12:02 PM
Unknown Object (File)
Mon, Jun 29, 12:41 AM
Unknown Object (File)
Thu, Jun 25, 8:11 PM
Unknown Object (File)
Thu, Jun 25, 10:39 AM
Subscribers

Details

Summary

metaslab.c already registers this tunable via ZFS_MODULE_PARAM, so the SYSCTL_UINT here is a second registration of the same leaf:

sysctl_register_oid: can't re-use a leaf (vfs.zfs.metaslab.condense_pct)

Remove it, as OpenZFS upstream did.

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Test Plan

Tested on FreeBSD 16.0-CURRENT: the warning is gone and vfs.zfs.metaslab.condense_pct still reads and writes.

Diff Detail

Repository
rG FreeBSD src repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 74077
Build 70960: arc lint + arc unit

Event Timeline

chris.longros_gmail.com edited the test plan for this revision. (Show Details)
chris.longros_gmail.com edited the summary of this revision. (Show Details)

Hm, I thought this was fixed by @mm's rGb1b4871f373e9f2a5defdc1242543be291f5e9d9, but apparently not:

sysctl_register_oid: can't re-use a leaf (vfs.zfs.metaslab.condense_pct)!

It looks good to me, but I'm not an OpenZFS expert, so probably better wait for an OK from @mm :)

In the kind of context that I originally reported based on:

I patched the /usr/main-src/ tree that I use for personal kernel and world builds, built the kernels (debug and non-debug), installed them, and boot tested them, and, finally, tested causing zfs.ko to load and tried reading and writing vfs.zfs.metaslab.condense_pct . It all seemed to work just fine, with no complaints being output. That included kldunload of zfs.ko .

(My non-personal kernels and worlds are from upstream pkgbase distributions. Not really a natural context for patch testing.)

So will this commit land to main ? :)

I do not know if testing is ever considered sufficient for an approval. That is all I reported up to now.

My code-level FreeBSD specific knowledge should normally be considered too weak to be reasonable for code review based overall approval --and I'm not a comitter. But this looks to be a very simple redundancy and the related code looks to be otherwise centralized in sys/contrib/openzfs/module/zfs/metaslab.c (making that likely the right one to preserve). It sure looks to me like it should be approved.