$ time udisksctl loop-setup -f Windows.iso                                       
Mapped file Windows.iso as /dev/loop0.

real    3m0.784s
user    0m0.015s
sys     0m0.010s


# time losetup -f Windows.iso

real    0m0.009s
user    0m0.001s
sys     0m0.004s

I need to use udisksctl because no root is required for it. However, my gripe with it is that compared to losetup it's extremely slow. I do want to note however that udisksctl rarely mounts it straight away like losetup does; however I don't know why. The mount command with the -o loop option is also very fast like losetup.

I did an strace on the udisksctl and it seems to be spending pretty much all that time on polling as I would have guessed based on the time measurement.

poll([{fd=8, events=POLLIN}], 1, -1)    = 1 ([{fd=8, revents=POLLIN}])
read(8, "\1\0\0\0\0\0\0\0", 16)         = 8
poll([{fd=8, events=POLLIN}], 1, -1

Is there anyway I can speed it up or at least some other non-root tool I can use? Also, are other people experiencing similar results?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.