Date: Wed, 11 Aug 2021 12:19:18 -0600 From: Alan Somers <asomers@freebsd.org> To: Ronald Klop <ronald-lists@klop.ws> Cc: src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org Subject: Re: git: 6c9506559080 - main - Escape any '.' characters in sysctl node names Message-ID: <CAOtMX2heKJayeDEOYwPw903P_5NqrFTrtirnkWj52PKTY2z%2B6A@mail.gmail.com> In-Reply-To: <076f21f0-c6f5-1137-f1e6-b251e01b456a@klop.ws> References: <202107221623.16MGNZDu023290@gitrepo.freebsd.org> <076f21f0-c6f5-1137-f1e6-b251e01b456a@klop.ws>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 11, 2021 at 12:06 PM Ronald Klop <ronald-lists@klop.ws> wrote: > On 7/22/21 6:23 PM, Alan Somers wrote: > > The branch main has been updated by asomers: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=6c9506559080da2914749bf611225d7c0a153609 > > > > commit 6c9506559080da2914749bf611225d7c0a153609 > > Author: Alan Somers <asomers@FreeBSD.org> > > AuthorDate: 2021-07-21 21:11:00 +0000 > > Commit: Alan Somers <asomers@FreeBSD.org> > > CommitDate: 2021-07-22 16:22:48 +0000 > > > > Escape any '.' characters in sysctl node names > > > > ZFS creates some sysctl nodes that include a pool name, and '.' is > an > > allowed character in pool names. But it's the separator in the > sysctl > > tree, so it can't be included in a sysctl name. Replace it with > "%25". > > Handily, "%" is illegal in ZFS pool names, so there's no ambiguity > > there. > > > Hi, > > Wouldn't it be cleaner to enumerate the pools as numbers/ids and put the > name of the pool in a field as the data instead of the key? > > Regards, > Ronald. > In fact, the dataset name (not pool name) is already represented that way, in a field like "kstat.zfs.zroot.dataset.objset-0x11.dataset_name: zroot/ROOT". So arguably the pool name should be represented in the same way, for consistency's sake. But that's a question to take up over at https://github.com/openzfs/zfs . Either way, FreeBSD's SYSCTL_ADD_NODE shouldn't generate an unusable sysctl yet return success. -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2heKJayeDEOYwPw903P_5NqrFTrtirnkWj52PKTY2z%2B6A>