Bug 417631 - Dismounting shares does not work all the time
Summary: Dismounting shares does not work all the time
Status: RESOLVED FIXED
Alias: None
Product: Smb4k
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Reinholdt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-14 12:27 UTC by Bernhard Lindner
Modified: 2020-02-29 08:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Lindner 2020-02-14 12:27:45 UTC
SUMMARY

When dismounting a list of mounted shares, it happens every time that some of the shares are not dismounted randomly.

STEPS TO REPRODUCE
1. Mount a list of share (5 is enough)
2. Use the main window button to dismount all of them

OBSERVED RESULT

Some of the shares stay mounted. An error message pops up saying the shares are busy. However the shares are not busy (at least not used by me). Immediately clicking the button again dismounts the remaining shares as well. It never happened that a share actually couldn't be dismount permanently.

EXPECTED RESULT

Shares are all dismounted on the firs try.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 18.04

ADDITIONAL INFORMATION
Feels like some internal timeout is to short and the "busy" error is actually wrong.
Or maybe the OS access the shares temporarily in the background.
Comment 1 Alexander Reinholdt 2020-02-17 06:05:21 UTC
THank you for reporting this issue. I will take care of it shortly.
Comment 2 Alexander Reinholdt 2020-02-29 08:05:54 UTC
Git commit ede54faf8ded7eb03ef86c6e03d2939b3c540519 by Alexander Reinholdt.
Committed on 29/02/2020 at 07:59.
Pushed by areinholdt into branch 'master'.

Fixed the unmounting of multiple shares: After each unmount Smb4K waits for 50 ms before starting the next unmount. All tests up to now showed no busy error anymore even when unmounting more than 10 shares at once.
Implemented inhibition of sleep and shutdown during unmount. The inhibition delays the shutdown/sleep untill all shares are unmounted.
Also, simplified notification after mounting and unmounting. This has the consequence that every mount is reported at the moment.

M  +31   -65   core/smb4kmounter.cpp
M  +1    -1    core/smb4kmounter.h
M  +2    -2    core/smb4kmounter_p.h

https://commits.kde.org/smb4k/ede54faf8ded7eb03ef86c6e03d2939b3c540519
Comment 3 Alexander Reinholdt 2020-02-29 08:12:18 UTC
Git commit 6910b8be60d55e80d2f2b020a99e0aafcf045e90 by Alexander Reinholdt.
Committed on 29/02/2020 at 08:11.
Pushed by areinholdt into branch '3.0'.

Wait for 50 ms after the unmount of a share before starting the next one.

M  +4    -0    core/smb4kmounter.cpp

https://commits.kde.org/smb4k/6910b8be60d55e80d2f2b020a99e0aafcf045e90