New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for SMB shares after suspend #2895
Conversation
jenkins test this please |
"Good to merge" or "won't break build"? But I like this PR. Hopefully NFS isn't forgotten. |
It didn't built yet - i have still problems with Jenkins - so basically this is a false status - still to be ignored - and if it was for real it would just indicate that it compiled on all platforms... |
CAEFactory::Suspend(); | ||
} | ||
|
||
void CPowerManager::WaitForNet() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
delay test spam - jenkins build this please |
@team For clarification "Good to merge" doesn't mean this PR is approved and cleared for merging. Its something the githubapi sets for us and we are not able to change that message atm. So feel informed about that |
Well I cannot offer complete failsafe solutions to the issues mentioned above regarding wait-for-net. Please help me out by providing ideas how you think the problems should be solved in a failsafe way. I would proprose that I remove the wait-for-net functionality from this PR and just stick with the SMB-Deinit stuff. Those are two totally independent features anyway. PS. |
I think removing the wait-for-net (or splitting into 2 separate commits) will be a good idea, yes. I am also not a team-member but I raised the issues because I feel the wait-for-net part overlaps with the recently added wake-on-access feature ; |
Oh fine, if the wait-for-net stuff is already there then its even better. I removed it from this PR so this is now just about deinitializing libsmbclient before going to suspend. |
a nice sideeffect of stopping/starting the addons, the pvr addon now imports the epg data after suspend. without this the epg-data gets out of syn after a few days and you have to manually reset the epg data or restart xbmc. |
@Memphiz would it make more sense if we split the start/stop addon stuff into a separated pull, so we can merge this in before? |
yeah sounds good - those are 2 unrelated things imo... |
The SMB-fix wont work properly without stopping the addons because a thread in a addon might re-init SMB just after it got deinited but before the system actually goes to suspend. I had this case when running the Library Watchdog addon. |
@verybadsoldier could you please split this in logical commits one for the addon stuff and a second for the smb. |
Sure, no problem. The splitted PR is here: #2946 |
Could you cherry-pick that one ontop of yours? If you have any chance for testing it with afp, nfs or sftp - this would be very welcome (i have no clean suspend on my rigs...). Else i would let that go in untested and wait for complaints on from users... |
Ok, done. Sorry, it seems I missed your comment before. But I cant test the other protocols either. NFS was tested by some users already because I applied the NFS-patch to some cusom OpenELEC builds already. |
jenkins test this please pretty pleeeease :) |
narf, sorry for the spam, wrong trigger. jenkins build this please |
Wrong trigger... Build vs. Test |
@Memphiz |
@verybadsoldier - is this the currently wanted implementation of this? I am a Bit confused with the forum thread where a different (or the Same?) Patch is discussed in conjunction with openelec... If it is the same i am Fine with merging this due to the positive feedback from oe users... |
Yes its basically the same in OE. Different in the OE patch is: |
Fix for SMB shares after suspend
{ | ||
CLog::Log(LOGDEBUG,"CApplication::CloseNetworkShares: Closing all network shares"); | ||
|
||
#if defined(HAS_FILESYSTEM_SMB) && !defined(_WIN32) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
It basically is supposed to do this:
-deinitialize libsmbclient before going to sleep (Linux only)
-start and stop all addon services before and after suspend (otherwise addons are able to reinitialize SMB right before actually going to sleep and break it)
More details here:
http://forum.xbmc.org/showthread.php?tid=166430