Hi Community,
Was wondering if anyone had any best practices when using DevLink to access a CIFS network drive?
Is there anything we should take note (e.g. auto disconnections from Windows, etc).
Is there a way to know if the session is still valid? Or perhaps it is better to DevUnlink it every time after using it (read/write files).
Best,
Samuel
Hi,
from my past experience, a CIFS connection can be interrupted by Windows (for example when there are longer timespans with no data transfer) . If that happens, there’s no reliable way to detect a broken connection, and can lead to very long function blocks call times in status BUSY until the channel can be re-established.
My recommendation is always using DevLink and DevUnlink together with the FileIO function blocks when accessing files via CIFS, and so to establish and close the channel every time when you need it.
Best regards.
1 Like
Hi Alexander,
Thanks for the input! Sometimes we experience DevLink getting stuck at BUSY and seems like there were no way to terminate anything other than Warm Restart of AR. Perhaps what you described is exactly the cause.
1 Like
Hi,
if you only use the share rarely I would recommend to unlink the connection when you do not need it and then establish the connection every time you need it again. There has been an upgrade of the SMB/CIFS stack in AR 6.4. You could give that a try to see if it improves the connection.
Stephan
1 Like
Hi Stephan,
Thanks for your input!
We will give AR 6.4 a try.
The application would sometimes require quite often access to the network drive. Depends on the machine’s condition but I guess general strategy would be reduce as much active connection as possible.