libblkid: no bcache UUID due to ambivalent detection of bcache and xfs_external_log for regular xfs in bcache backing device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Debian) |
Fix Released
|
Unknown
|
|||
util-linux (Ubuntu) |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Xenial |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Bionic |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Disco |
Won't Fix
|
Medium
|
Mauricio Faria de Oliveira | ||
Eoan |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Focal |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira |
Bug Description
[Impact]
* Users with an XFS filesystem on top of bcache
(this is seen on some ceph, cloud deployments)
might fail to reference the bcache device by
UUID or other udev properties.
* The journal of the regular XFS filesystem in
the bcache device is incorrectly detected as
an XFS external log; so two superblocks are
detected (bcache and xfs_external_log).
* Thus blkid fails with ambivalent superblocks
detected then doesn't provide the usual udev
properties (UUID, etc.)
* The fix improves the probe function for XFS
external log so it detects it's regular XFS
and bails out.
[Test Case]
* See test steps detailed in comment #7 and later.
- Create an XFS filesystem with the journal/log
in the beginning of the bcache device (< 256K).
- Stop the bcache device.
- Run '$ blkid -o udev -p $BCACHE_
$ sudo make-bcache -B $BACKING_DEV
$ sudo mkfs.xfs -d agsize=16m -l agnum=0 -f $BCACHE_DEV
$ echo 1 | sudo tee /sys/block/
$ sudo blkid -o udev -p $BACKING_DEV
[Regression Potential]
* The patch only changes the detection function
for XFS external log to be more general about
the sector where the magic of regular XFS may
be found (which is shifted inside the bcache.)
* It still checks at sector zero (the only one
checked previously), so this behavior didn't
change.
* Possible regressions are actual XFS external
log devices that are not anymore detected as
such. (Although that would probably indicate
a different bug in libblkid.)
[Other Info]
* upstream commit:
https:/
Changed in util-linux (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
summary: |
libblkid: no bcache UUID due to ambivalent detection of bcache and - xfs_external_log for regular xfs in bcache device + xfs_external_log for regular xfs in bcache backing device |
Changed in util-linux (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in util-linux (Ubuntu Eoan): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
Changed in util-linux (Ubuntu Disco): | |
status: | New → Invalid |
Changed in util-linux (Ubuntu Bionic): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
Changed in util-linux (Ubuntu Xenial): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
tags: | added: sts sts-sponsor-mfo |
Changed in util-linux (Ubuntu Disco): | |
status: | Invalid → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Mauricio Faria de Oliveira (mfo) |
description: | updated |
tags: | added: patch |
tags: | added: sts-sponsor-slashd-focal |
Changed in util-linux (Debian): | |
status: | Unknown → New |
Changed in util-linux (Debian): | |
status: | New → Confirmed |
Changed in util-linux (Debian): | |
status: | Confirmed → Fix Released |
tags: | removed: sts-sponsor-mfo |
Attaching the debdiffs for X/B/D/E/F for reference.
The package built successfully on all architectures
for all releases considered (X/B/D/E/F) in PPA [1].
The test results are positive: (see next comments)
- the latest version in -updates (X/B/D/F) or -proposed (E) fails
with ambivalent results detected (bcache + xfs external log)
and no UUID/other variables are printed.
- the version with the patch/from the PPA [1] succeeds
with only bcache detected, and prints the UUID/other variables.
The autopkgtest results ran against the PPA are positive.
All of them have a 'exitcode' of zero. (see next comments)
(Note: there's an util-linux in eoan-proposed that needs
work on its autopkgtest failures before this is uploaded,
which will be worked first. Eoan debdiff is on top of it.)
[1] https:/ /launchpad. net/~mfo/ +archive/ ubuntu/ lp1858802- sru/