amiga-smbfs icon indicating copy to clipboard operation
amiga-smbfs copied to clipboard

Smbfs2.1: DOSlist lock

Open raziel- opened this issue 2 years ago • 2 comments

It seems (and I'm just parrotting what i read here) https://www.amigans.net/modules/newbb/viewtopic.php?post_id=46287#forumpost46287 that, if remote host is gone, smbfs handler will lock the doslist too (?) Which leads to workbench become unresponsive.

Would it be possible to prevent that? Could the handler be taught to not lock doslist when the remote host is gone?

Thank you

raziel- avatar May 23 '22 07:05 raziel-

This is not really fixable at the level of the file system, I'm afraid.

When a command such as "DiskChange" needs to tell a file system to do something, it first has to find out how to talk to the file system. This is done by locking the global dos device/assignment/volume list, finding the matching record, sending a message to the file system, waiting for it to respond and then unlocking the global dos list again.

This is how a "die" command would work, too. But there's a problem here because the file system needs to shut down properly, removing any volume/device it added to the global dos list. It cannot do that because the "die" command is already holding onto it. It will try its best by repeately attempting to lock the global dos list and eventually has to give up after 100 attempts. So this is not a deadlock, it's just not able to shut down as required. Sending the smbfs command a Ctrl+C signal is bound to be safer because nobody has to wait for anything.

Implementing a "die" command which does not lock the global dos list should be possible, though. I reckon it has not been done yet.

obarthel avatar May 23 '22 13:05 obarthel

@obarthel

Who, you're still around, awesome :-)

It will try its best by repeately attempting to lock the global dos list and eventually has to give up after 100 attempts. So this is not a deadlock, it's just not able to shut down as required.

I did some more tests while waiting, madly clicking around on the WB icons and yes, its not a complete freeze, it will come back every once in a while (activating the last clicked icon), so that is good.

I'm trying with TIMEOUT now.

Thank you for your answer, very much appreciated.

I really hope you'll find the time to get back to smbfs...cough, cough, sambav2 support, cough ;-)

raziel- avatar May 23 '22 16:05 raziel-