hi, On Tue, Mar 24, 2026 at 9:58 AM Simon Burge <[email protected]> wrote: > > Hi Takashi, > > Takashi YAMAMOTO wrote: > > > the attached patch is my attempt to make zfs a bit more robust against > > device name changes. > > the identical patch is available at github too: > > https://github.com/yamt/netbsd-src/commit/32283c2e362034301c3da218a05849c04ee20c2a > > > > while it seems working as far as i tested, i'd be happy if someone can > > review it > > as my knowledge of zfs (well, and recent netbsd in general) is weak. > > There is some reasonable overlap with your patch and my work getting > NetBSD booting from a ZFS root file system: > > https://github.com/snarkophilus/src/blob/zfsboot/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c > > Your device_is_eligible_for_vdev() has overlap with what RAIDframe does. > I introduced a "storagepool" concept which Chuck didn't really like: > > https://mail-index.netbsd.org/tech-kern/2022/08/12/msg028311.html
i wasn't aware of the effort. thank you. do you want me to suspend my version? i'm not sure if D_STORAGEPOOL concept is generic enough to teach every drivers either. for zfs, the actual requirement is something like just "large enough". (cf. SPA_MINDEVSIZE) if we take that approach, i guess it should be visible to userland. (eg. libzfs) and probably for the corresponding cdev too. > > > https://github.com/snarkophilus/src/tree/zfsboot is my working tree. > I'm using this (with a few uncommitted mods) on my main server now. > > I need to find time to finish this work up, but alas I've been saying > that for a quite while now. The kernel and userland bits are mostly ok, > but the bootloader is a complete mess as far as both code cleanliness > and source file organisation. I don't have a good feel for how long it > would take to get that clean enough to commit. > > Now that you're looking at ZFS in more detail, I will try to make some > movement on my ZFS changes. (asking without looking at your code yet) is it based on freebsd's one? i hope it doesn't rely on spa_config_load, which has been retired in openzfs. > > Cheers, > Simon.
