[Bug 274878] ZFS: sysctl "kstat.zfs.POOLNAME.dataset.objset-0xXXXX.dataset_name" not updated when renaming zvols

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 02 Nov 2023 21:14:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274878

Alan Somers <asomers@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ZFS: Corruption in sysctl   |ZFS: sysctl
                   |"kstat.zfs.POOLNAME.dataset |"kstat.zfs.POOLNAME.dataset
                   |.objset-0xXXXX.dataset_name |.objset-0xXXXX.dataset_name
                   |"                           |" not updated when renaming
                   |                            |zvols

--- Comment #1 from Alan Somers <asomers@FreeBSD.org> ---
I've reproduced the issue in a VM.  As I suspected, it's caused by renames. 
But _only_ for zvols.  Renaming file systems does not trigger the bug.

Steps to Reproduce
==================

$ zpool create testpool vtbd1
$ zfs create -V1m testpool/testvol
$ sysctl -n kstat.zfs.testpool.dataset.objset-$(printf 0x%x $(zfs get -Hpo
value objsetid testpool/testvol)).dataset_name
testpool/testvol
$ sudo zfs rename testpool/testvol testpool/yyy
$ sysctl -n kstat.zfs.testpool.dataset.objset-$(printf 0x%x $(zfs get -Hpo
value objsetid testpool/yyy)).dataset_name
testpool/testvol

-- 
You are receiving this mail because:
You are the assignee for the bug.