Skip to content

udisks: Port to DBus Object Manager

Kai Uwe Broulik requested to merge work/kbroulik/object-manager-volume-25 into master

Instead of fetching device properties in the device itself (and other places), let UDisks Manager use DBus Object Manager to fetch all managed objects and their propertes in one go and then only update them as they change.

Device Backend is dropped in favor of having everything contained within the Manager, also reduces complexity of having a thread storage and static cache of backends, particularly since every thread gets its own Manager anyway.

Properties are also stored per-interface and only flattened as needed. Simplifies the update code since we can just add/remove indvidual interfaces instead of having them all mushed together.

Also moves value sanitation (removal of trailing NUL byte) into a dedicated UDisks Utils namespace.

This significantly reduces the amount of blocking DBus calls on application startup in e.g. KFilePlacesModel.


Attempt No. 25, prior art from half a decade ago: https://phabricator.kde.org/D19677

For lack of optical drive, those code paths are untested, please do.

@bruns @davidedmundson @nicolasfella

I removed the invalidation of properties after (un)mount introduced by d735708f since on my machine I get the change signals before the mount completes, I wonder if UDisks changed it up again?

Merge request reports