Damian Hazen a écrit :
If your goal is just to clear out the pending unmount event so that
umount completes, you can write a utility that gets the sessions, gets
the tokens, and then responds continue. The filesystem should unmount
and then you can go back to debugging why the HSM app. went away.
In fact, the problem occurs when the session was cleanly closed, but the
notification of event (unmount) for the file system was not removed
So, you try unmount the FS, DMAPI raises a event, but will not be able
to send it to the correct session because the dmapi information (event
disposition) concerning the FS are not available anymore, because the
session do not exist anymore.
The event is not pending, it is undelivered. But it will never be able
to be delivered because it's associated with a FS which is not available
anymore on the system but still not unmounted.
We just need to be sure all registered events are removed before
destroying the session. If not, and a event occurs, it could be recover
as long as it is not the UNMOUNT event.
And yes, i agree with the code comment header, this event will be better
if it is asynchronous.