John-Mark Gurney
2021-03-30 21:05:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254024
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254024#c11Looks like the user wasn't force unmounting the FS. There really
isn't any problem w/ kqueue, as a normal unmount is expected to be
refused while files are open.
I guess there COULD be a new flag added to file descriptors that
flag them as being able to be closed upon unmount. Then when an
unmount happens and only these flagged files remain, they are closed
allowing the fs to unmount. But this is a new feature and
independent
of kqueue.
there is no way to monitor a volume, or items within that volume,
without making it impossible to unmount the volume. I've been fighting
this with various implementations of desktop software for like 20 years
on freebsd. Usually I have to just disable all monitoring and live
with the reduced desktop functionality.
I wonder if a reasonable fix might be to have some sort of pre-unmount
event that can be delivered via kqueue, so that a userland entity
monitoring on that volume has a chance to close related descriptors so
that the unmount can proceed?
that you just have to flag the various fd's in the app as opposed to
add additional logic, and figure out how to tell the app to close the
fd's...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."