Debian Bug report logs -
#772744
btrfs-tools: btrfs dev scan called multiple times from udev rules
Reported by: Goffredo Baroncelli <kreijack@gmail.com>
Date: Wed, 10 Dec 2014 19:03:06 UTC
Severity: important
Found in version btrfs-tools/3.17-1.1
Fixed in version btrfs-tools/4.0-1
Done: Dimitri John Ledkov <dimitri.j.ledkov@linux.intel.com>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, kreijack@gmail.com, kreijack@inwind.it, Dimitri John Ledkov <xnox@debian.org>:
Bug#772744; Package btrfs-tools.
(Wed, 10 Dec 2014 19:03:11 GMT) (full text, mbox, link).
Acknowledgement sent
to Goffredo Baroncelli <kreijack@gmail.com>:
New Bug report received and forwarded. Copy sent to kreijack@gmail.com, kreijack@inwind.it, Dimitri John Ledkov <xnox@debian.org>.
(Wed, 10 Dec 2014 19:03:11 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: btrfs-tools
Version: 3.17-1.1
Severity: important
Hi all,
currently btrfs-tools contains two udev rules:
- 80-btrfs-lvm.rules
- 70-btrfs.rules
But also udev contains a btrfs rules
- 64-btrfs.rules
All rules do the same thing: invoke "btrfs device scan". Ok the
udev rules uses an internal builtin, but the results is the same
of the first two rules.
I am asking to remove the btrfs-tools rules (80-... and 70-...)
because the udev rule is sufficient and always present.
As confirmation I checked fedora, and there is only one
btrfs rule, the udev one.
BR
G.Baroncelli
-- System Information:
Debian Release: 8.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages btrfs-tools depends on:
ii e2fslibs 1.42.12-1
ii libblkid1 2.25.2-3
ii libc6 2.19-13
ii libcomerr2 1.42.12-1
ii liblzo2-2 2.08-1
ii libuuid1 2.25.2-3
ii zlib1g 1:1.2.8.dfsg-2+b1
btrfs-tools recommends no packages.
btrfs-tools suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org:
Bug#772744; Package btrfs-tools.
(Thu, 11 Dec 2014 20:39:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Dimitri John Ledkov <xnox@debian.org>:
Extra info received and forwarded to list.
(Thu, 11 Dec 2014 20:39:04 GMT) (full text, mbox, link).
Message #10 received at 772744@bugs.debian.org (full text, mbox, reply):
On 10 December 2014 at 19:00, Goffredo Baroncelli <kreijack@gmail.com> wrote:
> Package: btrfs-tools
> Version: 3.17-1.1
> Severity: important
>
> Hi all,
>
> currently btrfs-tools contains two udev rules:
> - 80-btrfs-lvm.rules
> - 70-btrfs.rules
>
These two are different due to different conditions. These could be
combined into a single file, but imho it's best to keep them
segregated.
> But also udev contains a btrfs rules
>
> - 64-btrfs.rules
>
> All rules do the same thing: invoke "btrfs device scan". Ok the
> udev rules uses an internal builtin, but the results is the same
> of the first two rules.
>
64-btrfs.rules does not call scan, it marks btrfs devices as ready
only. These are not equivalent.
> I am asking to remove the btrfs-tools rules (80-... and 70-...)
> because the udev rule is sufficient and always present.
>
All three do different things, under different conditions and are not
equivalent.
> As confirmation I checked fedora, and there is only one
> btrfs rule, the udev one.
>
Fedora does not use initramfs-tools, but dracut which incidentally
ships a udev rule to call btrfs device scan. Thus even fedora has an
extra udev rule to call btrfs scan.
Do you have a bug with current package? If yes, please describe it,
otherwise I will be closing this bug report as won't fix.
Regards,
Dimitri.
> BR
> G.Baroncelli
>
>
> -- System Information:
> Debian Release: 8.0
> APT prefers unstable
> APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages btrfs-tools depends on:
> ii e2fslibs 1.42.12-1
> ii libblkid1 2.25.2-3
> ii libc6 2.19-13
> ii libcomerr2 1.42.12-1
> ii liblzo2-2 2.08-1
> ii libuuid1 2.25.2-3
> ii zlib1g 1:1.2.8.dfsg-2+b1
>
> btrfs-tools recommends no packages.
>
> btrfs-tools suggests no packages.
>
> -- no debconf information
--
Regards,
Dimitri.
Information forwarded
to debian-bugs-dist@lists.debian.org, Dimitri John Ledkov <xnox@debian.org>:
Bug#772744; Package btrfs-tools.
(Thu, 11 Dec 2014 22:12:13 GMT) (full text, mbox, link).
Acknowledgement sent
to kreijack@inwind.it:
Extra info received and forwarded to list. Copy sent to Dimitri John Ledkov <xnox@debian.org>.
(Thu, 11 Dec 2014 22:12:13 GMT) (full text, mbox, link).
Message #15 received at 772744@bugs.debian.org (full text, mbox, reply):
On 12/11/2014 09:37 PM, Dimitri John Ledkov wrote:
> On 10 December 2014 at 19:00, Goffredo Baroncelli <kreijack@gmail.com> wrote:
[...]
>> But also udev contains a btrfs rules
>>
>> - 64-btrfs.rules
>>
>> All rules do the same thing: invoke "btrfs device scan". Ok the
>> udev rules uses an internal builtin, but the results is the same
>> of the first two rules.
>>
>
> 64-btrfs.rules does not call scan, it marks btrfs devices as ready
> only. These are not equivalent.
It does a "BTRFS_IOC_DEVICES_READY" ioctl (see udev-builtin-btrfs.c),
which, despite its name, *registers* the passed device *and checks* if
the number of registered device is sufficient. From fs/btrfs/super.c
[...]
/*
* used by btrfsctl to scan devices when no FS is mounted
*/
static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
[...]
switch (cmd) {
case BTRFS_IOC_SCAN_DEV:
ret = btrfs_scan_one_device(vol->name, FMODE_READ,
&btrfs_fs_type, &fs_devices);
break;
case BTRFS_IOC_DEVICES_READY:
ret = btrfs_scan_one_device(vol->name, FMODE_READ,
&btrfs_fs_type, &fs_devices);
if (ret)
break;
ret = !(fs_devices->num_devices == fs_devices->total_devices);
break;
}
As you can see BTRFS_IOC_DEVICES_READY acts ALSO as BTRFS_IOC_SCAN_DEV.
(Yes, the name is very confusing, so only looking at the code this thing
is clear)
>
>> I am asking to remove the btrfs-tools rules (80-... and 70-...)
>> because the udev rule is sufficient and always present.
>>
>
> All three do different things, under different conditions and are not
> equivalent.
The 64-btrfs.rules is able to superseed the two btrfs-tools package rules (80-...
and 70-...). So it is not true that these rules do different thing.
The 80-btrfs-lvm.rules and 70-btrfs.rules appeared before the 64-btrfs.rules (March 2012 vs September 2012). This explain the redundancy.
BTW, ironically I was one of the first to suggest to put "btrfs device scan" in a btrfs rule (http://permalink.gmane.org/gmane.comp.file-systems.btrfs/5374)
>
>> As confirmation I checked fedora, and there is only one
>> btrfs rule, the udev one.
>>
>
> Fedora does not use initramfs-tools, but dracut which incidentally
> ships a udev rule to call btrfs device scan.
I checked a fedora initramfs and I was unable to find this rule (except
the 64-btrfs.rules)
I am referring the Fedora case to support my request to leave
only 64-btrfs.rules: it is sufficient to cover all the cases. Otherwise
we could drop the 64-btrfs.rules and leave the 70-... and 80-... But
because these are less generic and Debian specific I don't see a valid reason
for that.
64-btrfs.rules is also more efficient because it calls a built-in command and
not an external one.
> Thus even fedora has an
> extra udev rule to call btrfs scan.
No, it has only the 64-btrfs.rules. I re-checked now a fedora-20 initramfs (
initramfs-3.17.4-200.fc20.x86_64.img) and:
- I was able to find the btrfs tools
- I found /lib/udev/rules/64-btrfs.rules (which is the same shipped by
the debian udev package)
- I didn't find any "btrfs dev scan" invocation.
> Do you have a bug with current package? If yes, please describe it,
> otherwise I will be closing this bug report as won't fix.
the problem tha I found was that we have three udev rules, when only one
is sufficient; I am suggesting to adopt the rule shipped with udev.
If you think that this is not a bug, please consider it as wishlist
BTW, I noticed that the debian rules do the insmod the btrfs module. But this
should be not necessary anymore. Udev is in charge to create the /dev/btrfs-control
device. Any access to this device name starts the insmod of the btrfs module.
(see https://lkml.org/lkml/2010/5/21/134)
>
> Regards,
>
> Dimitri.
>
BR
Goffredo
>
>> BR
>> G.Baroncelli
>>
>>
>> -- System Information:
>> Debian Release: 8.0
>> APT prefers unstable
>> APT policy: (500, 'unstable')
>> Architecture: amd64 (x86_64)
>>
>> Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
>> Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
>> Shell: /bin/sh linked to /bin/dash
>> Init: systemd (via /run/systemd/system)
>>
>> Versions of packages btrfs-tools depends on:
>> ii e2fslibs 1.42.12-1
>> ii libblkid1 2.25.2-3
>> ii libc6 2.19-13
>> ii libcomerr2 1.42.12-1
>> ii liblzo2-2 2.08-1
>> ii libuuid1 2.25.2-3
>> ii zlib1g 1:1.2.8.dfsg-2+b1
>>
>> btrfs-tools recommends no packages.
>>
>> btrfs-tools suggests no packages.
>>
>> -- no debconf information
>
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5
Reply sent
to Dimitri John Ledkov <dimitri.j.ledkov@linux.intel.com>:
You have taken responsibility.
(Sun, 03 May 2015 23:06:10 GMT) (full text, mbox, link).
Notification sent
to Goffredo Baroncelli <kreijack@gmail.com>:
Bug acknowledged by developer.
(Sun, 03 May 2015 23:06:10 GMT) (full text, mbox, link).
Message #20 received at 772744-close@bugs.debian.org (full text, mbox, reply):
Source: btrfs-tools
Source-Version: 4.0-1
We believe that the bug you reported is fixed in the latest version of
btrfs-tools, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 772744@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dimitri John Ledkov <dimitri.j.ledkov@linux.intel.com> (supplier of updated btrfs-tools package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 18 Jan 2015 00:14:20 +0000
Source: btrfs-tools
Binary: btrfs-tools btrfs-tools-udeb btrfs-tools-dbg
Architecture: amd64 source
Version: 4.0-1
Distribution: unstable
Urgency: medium
Maintainer: Dimitri John Ledkov <xnox@debian.org>
Changed-By: Dimitri John Ledkov <dimitri.j.ledkov@linux.intel.com>
Closes: 770806 772744
Description:
btrfs-tools - Checksumming Copy on Write Filesystem utilities
btrfs-tools-dbg - Checksumming Copy on Write Filesystem utilities (debug)
btrfs-tools-udeb - Checksumming Copy on Write Filesystem utilities (udeb) (udeb)
Changes:
btrfs-tools (4.0-1) unstable; urgency=medium
.
* New upstream release.
* Drop all patches.
* Experiment with dropping udev rules, in favour of systemd-udev builtin
integration. (Closes: #772744)
* Move all binaries to /bin (Closes: #770806)
* Switch to autoconf based build system.
Checksums-Sha1:
e2c581ce2e1f5f56d6cebadb50962556db21a91c 1647 btrfs-tools_4.0-1.dsc
82866eaa7baccc984883457cedf45b52a437e348 1102500 btrfs-tools_4.0.orig.tar.xz
d041cfa484d06646c4ffce9a2b6256189791e43a 8340 btrfs-tools_4.0-1.debian.tar.xz
6774e3086176f972abf210b6aa1397dec10f7576 476136 btrfs-tools_4.0-1_amd64.deb
55945fd0e1c1c5a179e953442ad4847ab2ee7b79 231100 btrfs-tools-udeb_4.0-1_amd64.udeb
3627cb723ef31a3a145cdacf5b0d3b7e27329ac2 3894778 btrfs-tools-dbg_4.0-1_amd64.deb
Checksums-Sha256:
5baa00a58f695f285433742d5196f9b93948f2b586b80b30a220cd3906dbaa46 1647 btrfs-tools_4.0-1.dsc
179cf1acc1b0061548b8f1d9cf973a8338bf96f192cecad99ecdace9ae065a1f 1102500 btrfs-tools_4.0.orig.tar.xz
91015b9149551475e91a9ff7ce49739fc061228fb97a9407cdf06f9f73194581 8340 btrfs-tools_4.0-1.debian.tar.xz
e1c0d76f24c7c68563c12097da63a0f04dfe9ff173e6f0c826c56e08e2b94949 476136 btrfs-tools_4.0-1_amd64.deb
4ee916413f2c0beca383e61d52f53eec344504f4723bcf15d6cd6560e9494b12 231100 btrfs-tools-udeb_4.0-1_amd64.udeb
566c4cc0020aabece6b8119b225b6e03bbf641630283faedd3d00a0b659257b2 3894778 btrfs-tools-dbg_4.0-1_amd64.deb
Files:
a62878f9cd23cb65f98e61eb2dfc8a0a 1647 admin optional btrfs-tools_4.0-1.dsc
38e79509adc689ca7a88860b91954a02 1102500 admin optional btrfs-tools_4.0.orig.tar.xz
c07ed9666faabd503f25a27003efd54f 8340 admin optional btrfs-tools_4.0-1.debian.tar.xz
3dc5c3cadfbb253cd9be191672e049f7 476136 admin optional btrfs-tools_4.0-1_amd64.deb
f1e39dc3cc24a19e9cccb6bde8f1e560 231100 debian-installer optional btrfs-tools-udeb_4.0-1_amd64.udeb
39d262389c2fc2637cdff246c79ec899 3894778 debug extra btrfs-tools-dbg_4.0-1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQEcBAEBAgAGBQJVRqQtAAoJEEM4jufBUcnJ3KwH/1WgH92YlzmEUZ4Bliw5EqIC
3WAop7TSEjQ0dKWVYgkCUrb+B9ANPYoujm1BezJBuBtqRalqINUsqHL1qy/9C9T3
iM7thB9Wx1TU2gcSN6qYJgGlqtKY+pLgjWDJdoqW49CFiO8jybxvgO6xFs2du2KO
bClfmftGSqJLWjLhW51Vv51Iy94Z1npgP47AkDNOY9ddNEc+s1gXojjRBV+TFKGP
vlrpcyVUkx5uarUH96qpH3HH44HBSxNOsvIPSVkCzeezEwkqLXajv1fV99ucGdFM
85ZQvsfGjkP+y6niQuGeuYZoKsXDqv7TRokYSCMh/EFDQ9UEKLkrUJiKBnOj+80=
=3jex
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 01 Jun 2015 07:30:29 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Fri Jul 24 03:12:23 2020;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.