Kostik Belousov wrote:
On Fri, Dec 19, 2008 at 12:52:12PM -0800, Maxim Sobolev wrote:
Should not it be better to implement this on the kernel side when the
device is closed abruptly?
The state that is kept is not accumulated on any particular filedescriptor,
it is associated with the physical state of the device.
Therefore, I think that kernel shall not be charged with cleanup, and
userspace calls should deal with resetting device back to the pristine
state.
It may not be associated with any particular descriptor, still you can
count number of opens for write compared to count of closes in the
kernel. And it should be trivial to track when this number goes down to
0 and clean up any leftover mess. Check dev/md/md.c for example,
function g_md_access().
-Maxim
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"