Description
System information
Type | Version/Name |
---|---|
Distribution Name | Debian |
Distribution Version | 10 |
Linux Kernel | 4.19.0-14-amd64 |
Architecture | x86_64 |
ZFS Version | 0.8.6-1~bpo10+1 |
(This is also true on 2.0.3 and 2.1.0-rc4)
Describe the problem you're observing
Much to my surprise one day, when I went to set zfs_dbgmsg_enable=1, /proc/spl/kstat/zfs/dbgmsg was already full of entries! (And yes, it was set to 0 before I went to change it.) Nope, I'm wrong, I just assumed it, as the man page said, defaulted to 0, when I can see in the code and by testing in a VM that it defaults to 1.
So I concluded, maybe it solely functions to drop entries, and zfs-module-parameters(5) is stale. So after writing 1 to zfs_dbgmsg_enable, I wrote 0, and surprise, the contents of dbgmsg was unaffected!
Okay, maybe it only affects log lines printed by non-zero zfs_flags settings. Set zfs_dbgmsg_enable back to 1, set zfs_flags to 513, do a few send/recvs and zfs destroys, This was my misunderstanding.wc -l
on dbgmsg before and after echoing 0 to zfs_dbgmsg_enable...no difference in line count.
So I tried setting zfs_dbgmsg_enable=0, and then doing a few more send/recvs, and checking the contents of dbgmsg - yup, the number of lines keeps incrementing. I guess it doesn't affect zfs_flags prints?
So I think either the documentation should be revised, or how it works (or doesn't) should be.