On Thu, Mar 27, 2025 at 05:42:03AM +0700, Robert Elz wrote: > | Because vnds are specifically configured for mounts; the only thing > | they're useful for is mounting a fs image that lives in a regular > | file. > > No they're not, they can be used for playing with newfs variants, > fsdb, fsck, resize_ffs, ... Nothing requires they be mounted.
Those will all run on regular files. The only thing that requires a device for a fs image is mount. But that's a backwards argument anyway. The point is that a vnd is a shim whose purpose is to work around a weakness in the system interfaces. (Namely, that you can't mount a fs image in a regular file.) It has no state, and no semantics of its own either; it's just a plug. It is perfectly reasonable for mount to create a vnd automatically when you ask it to mount an image that's a regular file, and dispose of it equally automatically later. This is not true of, and doesn't make sense for, raid, ccd, cgd, or any of your other examples. -- David A. Holland dholl...@netbsd.org