Skip to content
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

udiskslinuxfilesystem: Update udisks_linux_filesystem_update() call #873

Closed
wants to merge 2 commits into from
Closed

Conversation

HeroesLoveToRoujiamo
Copy link

When the udisks_linux_filesystem_update() function calls the
udisks_linux_filesystem_update() function, it adopts a
multi-threaded method. Prevent the main process from
freezing when a certain device resource is occupied.
#871

Signed-off-by: changlianzhi changlianzhi@uniontech.com

When the udisks_linux_filesystem_update() function calls the
udisks_linux_filesystem_update() function, it adopts a
multi-threaded method. Prevent the main process from
freezing when a certain device resource is occupied.

Signed-off-by: changlianzhi <changlianzhi@uniontech.com>
@StorageGhoul
Copy link

Can one of the admins verify this patch?

@HeroesLoveToRoujiamo
Copy link
Author

HeroesLoveToRoujiamo commented Apr 1, 2021

Since org.freedesktop.UDisks2.Filesystem.Size is necessary at all times, then we use multi-threading to solve this problem, what do you think?@tbzatek

@tbzatek
Copy link
Member

tbzatek commented Apr 1, 2021

I appreciate your effort, unfortunately uevent processing chain needs to be done entirely in the main thread. This is the fundamental requisite which other objects depend on, i.e. having the org.freedesktop.UDisks2.Filesystem interface completely updated as a result of a uevent being processed so that methods waiting in other threads can continue their work. Complex storage layers like LVM2 also require up-to-date information on related block objects that provide necessary information to build a layered object on.

We've spent considerable amount of time to ensure predictability of the UDisks API for scripting purposes where serialization is a key and async approach is a big problem.

Believe me, we've been dealing with this exact problem in the past yet there's no suitable solution without breaking the ABI or API. A solution might be to rewrite bd_fs_ext3_get_info() and others to avoid spawning an external command and rather parse the data from kernel or a runtime state somewhere with minimal I/O.

@HeroesLoveToRoujiamo
Copy link
Author

Thank you very much. It seems that my understanding of udisks2 is far from enough and I haven't considered these issues. Let me try it hard!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants