Subject: what happens if a block device is vdevgone()?
To: None <tech-kern@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-kern
Date: 05/07/2002 20:21:02
Trying to understand some unforgiving behaviour if a
USB disk is removed while its filesystem is mounted...
What _should_ happen to open files if the underlying disk
is removed:
a) they are all vgone(), all traces in the filesystem
and uvm are removed by higher layer functions, or
b) the filesystem code has to check for a valid underlying
bdev on every call
The disk driver already calls vdevgone() for all
disk cdevs and bdevs.
Does this only mean the mounted filesystems are notified,
or even some cleanup at higher levels?
(If yes, it doesn't work too well, otherwise I wouldn't
get all these crashes or hangs in vn_lock()...)
best regards
Matthias