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
F160573962: D57721.id.diff
Thu, Jun 25, 8:11 PM
F160534925: D57721.id180209.diff
Thu, Jun 25, 10:39 AM
F160533304: D57721.id.diff
Thu, Jun 25, 10:21 AM
F160533288: D57721.id.diff
Thu, Jun 25, 10:21 AM
F160509527: D57721.id180209.diff
Thu, Jun 25, 5:35 AM
F160500421: D57721.diff
Thu, Jun 25, 3:43 AM
Unknown Object (File)
Wed, Jun 24, 7:52 AM
Unknown Object (File)
Wed, Jun 24, 6:38 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.)