<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - g_udev_client_query_by_device_number fails on disks with subvolumes"
href="https://bugs.freedesktop.org/show_bug.cgi?id=66702">66702</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>g_udev_client_query_by_device_number fails on disks with subvolumes
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jpakkane@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=82191" name="attach_82191" title="Source code to demonstrate the issue">attachment 82191</a> <a href="attachment.cgi?id=82191&action=edit" title="Source code to demonstrate the issue">[details]</a></span>
Source code to demonstrate the issue
Sorry if this bug is filed in the wrong place. Information on GUdev is sparse
and as far as I can tell, systemd is the upstream.
Anyway, the g_udev_client_query_by_device_number function fails on directories
that are in subvolumes. An example is a btrfs file system with two subvolumes,
@ (mounted as root) and @home (mounted as /home). This also happens when using
encrypted home directories.
Having a subvolume might not be the real reason it fails, but that is what
seems to be triggering the issue.
To replicate, download the attached source code. Compile it with "gcc -Wall -o
idnum idnum.c `pkg-config --cflags --libs glib-2.0 gio-2.0 gudev-1.0`".
When run on a plain ext4 volume, the output is this:
./idnum
Device id is 2065.
Whereas on btrfs the output is this:
./idnum
Device id is 25.
Could not get device from num.
Originally filed here:
<a href="https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1197796">https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1197796</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>