Bug 59546 - Serials of QEMU virtio disks are not detected
Summary: Serials of QEMU virtio disks are not detected
Status: REOPENED
Alias: None
Product: udisks
Classification: Unclassified
Component: detection (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-18 07:21 UTC by Marius Vollmer
Modified: 2013-10-08 13:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Marius Vollmer 2013-01-18 07:21:48 UTC
Udisks2 looks at the ID_SERIAL_SHORT property to set the serial of a drive in the generic case, but virtio devices only have a ID_SERIAL property.

This happens with udisks2-2.0.1-1.fc18.x86_64 on Fedora 18.
Comment 1 David Zeuthen (not reading bugmail) 2013-01-19 15:27:27 UTC
On the one side you can argue that it's a bug in whatever qemu udev rule / helper insofar that it doesn't set ID_SERIAL_SHORT. But I think it's easier to just make udisks2 look at ID_SERIAL in the case that ID_SERIAL_SHORT is not set. Would be good to fix for the upcoming 2.1 release (probably cherry-pickable to the udisks-2-0 branch as well). Cheers.
Comment 2 David Zeuthen (not reading bugmail) 2013-03-17 22:11:32 UTC
Fixed in master.
Comment 3 Marius Vollmer 2013-03-19 07:28:20 UTC
Verified, thanks!
Comment 4 Ignaz Forster 2013-10-08 13:26:02 UTC
I'm sorry for reopening this bug, but I think udisks was the wrong place to fix the problem.

With this patch applied it's not possible to distiguish between devices that don't have any serial number and devices that do. This is a problem when using polit with udisks, as you never know if you see the real serial number of the device or not (and thus potentially blocking devices that you didn't want to block).

Probably the easiest solution for satisfying both use cases would be to present both values to the user - users only interested in any string or incomplete information could use the ID_SERIAL based value, users interested in the real ID could use ID_SERIAL_SHORT's value. However I still think the best way would be to fix the problem at it's source instead and revert this patch...

(I am aware I could rebuild udev's ID_SERIAL string with the information provided by udisks and then check if it matches udisks serial, but that sounds more like a workaround than a recommended way ;-))


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.