-
Notifications
You must be signed in to change notification settings - Fork 143
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 loop device setup #819
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
2c0ff52
to
7fe04e7
Compare
Changed wording of an error message... Anyway, I'm still thinking about reworking uevent trigger a little bit... Historically we've been getting sysfs path from a What we can do is to bypass udev and construct the sysfs path manually, avoiding potential race from udev holding either old device path or none (yet) at all. In most of the cases the path construction would be pretty straightforward, however we might need to resolve device symlinks in some cases. In particular the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hate to see things like this being added to UDisks, but it's the only realistic way of fixing things. ACK.
Yeah, we tend to generate too many uevents, basically every intrusive operation is followed by explicit uevent trigger. That's in place already over majority of the damon methods. It's the most reliable way however to ensure everything is up-to-date. |
I put together the suggested fix, but the bug persists.
PS// update. I experimented a little - the problem turned out to be in the 5.8.12 kernel, having rolled back to the stable 5.4.80 kernel everything worked fine. |
@gramozeka, have you built and ran the daemon with the fix? |
of course, I understand how it works (I hope the insanity did not finish me), udisks does not work in dolphin (kf5)&nautilus(gnome-3.38) aka "connect disk image" with new kernels (I did not even touch the 5.9.XX branch), I used this to get debug. And yes, I used a branch udisks-8d5c90a1f4bbe548a1ae361f8d69970669d6e72e, the problem is not in the code udisks, the problem is new kernel breaks. With the kernel 5.4.XX everything works fine, both the stable version udisks-2.9.1 and that version with fixes. here is the output strace with a working kernel(in atached) |
7fe04e7
to
5000103
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good to me. Hope it actually fixes the issues :-)
Could we add some test case for this? (Something more reliable than the "randomly broken" test_loop_ro
from #800?)
Hmm, do you have any suggestion? I can't think of any test that would actually raise the error to test the negative case. This commit fixes the |
… UDisksLinuxBlockObject This decouples uevent triggering from UDisksLinuxBlockObject as sometimes we don't have a block object yet or it's outdated.
Actually found another tiny bug in my code, hard to hit in real use case scenarios though... |
This will trigger extra uevent after loop device setup to ensure all objects are updated.
Resolves #800
Resolves #817
Resolves #580
Resolves #828