tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sbin/umount
Date: Sun, 30 Mar 2025 00:39:38 +0000
From: David Holland <dholland-tech%netbsd.org@localhost>
Message-ID: <Z-iSyp7O9ianWVSq%netbsd.org@localhost>
[source-changes-d (and christos) deleted from cc list.]
| Those will all run on regular files. The only thing that requires a
| device for a fs image is mount.
That's true to an extent, but a vnd can also have a label (any
of the various possibilities) and internal partitions and a
regular file cannot. Further the code in all those utilities
to run on files (or most of them) is special cased, and while running
on a file is fine for testing the algorithms in those things (whether
fsck correctly finds unallocated blocks, for example) it doesn't
test any of the device interface code (determining the device block
size, and other related issues).
| It has no state, and no semantics of its own either; it's just
| a plug.
Yes, it makes a file look like a device, and have all the properties
of a device (including issues like that the raw version can only
read/write entire blocks, not individual bytes). Not a lot of state,
unless you count a label in the file state, but it certainly has semantics.
| It is perfectly reasonable for mount to create a vnd automatically
| when you ask it to mount an image that's a regular file,
Yes, and if the code in question had done that, I wouldn't have objected,
that is perhaps reasonable, and certainly only possible for vnd, not
the others.
But that's not what it was, it was this:
| and dispose of it equally automatically later.
except for the "and" part, for which
| This is not true of, and doesn't make sense for, raid, ccd, cgd, or
| any of your other examples.
is nonsense. Any of them, if no longer in use, and when the user
requests it, can trivially be disposed of once no longer mounted
(disposed of, as in unconfigured, not destroyed, though for some
that might also be an option).
If code to automatically create a vnd when attempting to mount a
file (which I'd prefer required a new option, not just happen, so
typos when mounting don't succeed in an entirely unexpected way),
then that could set a (new) mount flag so the vnd created would be
unconfigured when the umount succeeds, without the need to give -d.
kre
Home |
Main Index |
Thread Index |
Old Index