From owner-dev-commits-src-all@freebsd.org Wed Aug 11 18:19:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85A926590C2; Wed, 11 Aug 2021 18:19:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GlJ4m2rFrz3qPs; Wed, 11 Aug 2021 18:19:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f169.google.com with SMTP id r5so5895120oiw.7; Wed, 11 Aug 2021 11:19:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rGjydspLXymfBFafrk49R9vB+13IsQTapLE9914tGTI=; b=U00XDtEv9p99qAWZuPaGIvSqOYedlrymofRtpnlbtsPHNP7F4RqA1FOPi4xaQtel0a HifXkTLocCt7XZ5pNlH6bCqF+gH/d6Ozd/xQOfxHGuJQ+hW1fh/AnCv5kPeb3Q3WeKko 4BW6SuvaOcMdDHedzdWysCJR4xoMKpgEhnoHKsz/QuRpbveOSES3IrmhbHy2Kd74hEia 5E8G0gjscVLj+oQxlXWbAvyoC3QN82Tl0ChTIodWd//9aGSCNhHlkRFBEuk0JFO2jdxU ATptYSWP/nBMnYVS7WueouHtsfGN6o1f8XqCsEQlphtA1DixCoxxxNlPLhLML2XQPdJ/ Ekzg== X-Gm-Message-State: AOAM532JTxlk7aQiT6Madha80vu5ByknD99SU6BgrLSn9kcNfVgTz2c0 0Pdjn93J6KQZsxONsVTcUS6ftWnC3d0myQnn5pHUzCjl43k= X-Google-Smtp-Source: ABdhPJxb6WTSd2DnLnZj9oe/wIIOqLMD9M4S/HOZ60xIU0C8b3drqkmcpAiCuNgUY8eGJV4aTyAVOQzIQH1UK96G/d8= X-Received: by 2002:aca:4ed6:: with SMTP id c205mr157673oib.57.1628705969067; Wed, 11 Aug 2021 11:19:29 -0700 (PDT) MIME-Version: 1.0 References: <202107221623.16MGNZDu023290@gitrepo.freebsd.org> <076f21f0-c6f5-1137-f1e6-b251e01b456a@klop.ws> In-Reply-To: <076f21f0-c6f5-1137-f1e6-b251e01b456a@klop.ws> From: Alan Somers Date: Wed, 11 Aug 2021 12:19:18 -0600 Message-ID: Subject: Re: git: 6c9506559080 - main - Escape any '.' characters in sysctl node names To: Ronald Klop Cc: src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4GlJ4m2rFrz3qPs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2021 18:19:36 -0000 On Wed, Aug 11, 2021 at 12:06 PM Ronald Klop 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 > > AuthorDate: 2021-07-21 21:11:00 +0000 > > Commit: Alan Somers > > 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