GNOME Bugzilla – Bug 733601
Btrfs: Warnings and missing label with btrfs-progs 3.12 and 3.14
Last modified: 2014-10-20 17:09:38 UTC
Hi Curtis, I decided that the issues found with btrfs file system show from btrfs-progs v3.12 and v3.14 to v3.14.1, as reported in bug #723842 comment #48, would best be addressed under a separate bug report. Restating the issue ... I've been looking further into the btrfs label disappearing fault and found two separate issues. Issue (1): Btrfs partition shows a warning when mounted * Caused by btrfs filesystem show /dev/PTN returning failed exit status 1 when the file system is mounted. * Effects btrfs-progs 3.14 & 3.14.1. * Distros effected: ** Fedora 19 with btrfs-progs 3.14.1. * This is what I previously described in bug #723842 comment #41. ** Not set any file system usage, this raising a warning against the partition which will include the "btrfs filesystem show" command output in the message. ** No load the btrfs_device_cache so membership breaks. Therefore multi-device busy detection and mount point reporting breaks for the non-mounting device. ** Fall back to reading the label via the blkid cache. # fgrep sdb1 /proc/mounts /dev/sdb1 /mnt/1 btrfs rw,seclabel,relatime,space_cache 0 0 # btrfs filesystem show /dev/sdb1 Label: 'test1-btrfs' uuid: 033e6b07-ee6a-4620-a585-8580a2b83275 Total devices 1 FS bytes used 192.00KiB devid 1 size 2.00GiB used 240.75MiB path /dev/sdb1 Btrfs v3.14.1 # echo $? 1 # umount /dev/sdb1 # btrfs filesystem show /dev/sdb1 Label: 'test1-btrfs' uuid: 033e6b07-ee6a-4620-a585-8580a2b83275 Total devices 1 FS bytes used 192.00KiB devid 1 size 2.00GiB used 240.75MiB path /dev/sdb1 Btrfs v3.14.1 # echo $? 0 Probably caused by commit in btrfs-progs v3.14: btrfs-progs: make filesystem show by label work http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit/?id=a156b967ed9bd606afa8dc402451abcf07226c17 Fixed by commit in btrfs-progs v3.14.2: btrfs-progs: Fix the return value of btrfs_scan_kernel() http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit/?id=ccd14cbf62026fd84113bcf886732fcc3391cb5b Issue (2): btrfs filesystem label is not shown when mounted * Caused by btrfs filesystem show /dev/PTN changing it's output and removing the single quotes around the label, but only when mounted. * Effects btrfs-progs 3.12 only. * Distros effected: ** Xubuntu 14.04 LTS with btrfs-tools 3.12. ** CentOS 7.0 with btrfs-progs 3.12. * Causes the label to be read as blank, but only when mounted. This is what Curtis reported against ubuntu 14.04 LTS in bug #723842 comment #37. # fgrep sdb1 /proc/mounts /dev/sdb1 /mnt/1 btrfs rw,relatime,space_cache 0 0 # btrfs filesystem show /dev/sdb1 Label: test1-btrfs uuid: 1f78fa38-2f85-41d3-9be6-ae0356ae9469 Total devices 1 FS bytes used 192.00KiB devid 1 size 2.00GiB used 240.75MiB path /dev/sdb1 Btrfs v3.12 # umount /dev/sdb1 # btrfs filesystem show /dev/sdb1 Label: 'test1-btrfs' uuid: 1f78fa38-2f85-41d3-9be6-ae0356ae9469 Total devices 1 FS bytes used 192.00KiB devid 1 size 2.00GiB used 240.75MiB path /dev/sdb1 Btrfs v3.12 Caused by commit in btrfs-progs v3.12: btrfs-progs: use kernel for mounted disk for show http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit/?id=6c2c30ce03c0beba716b5a054b64c6bf62068cb6 Fixed by commit in btrfs-progs v3.14: btrfs-progs: make filesystem show by label work http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit/?id=a156b967ed9bd606afa8dc402451abcf07226c17 Thanks, Mike
Created attachment 281636 [details] [review] Btrfs filesystem show fixes (v1) Hi Curtis, Here's the patchset to fix these issues. Need to apply "Multi-device btrfs support (v2)" patchset from bug #723842 first and this one second. Tested on Fedora 19 w/ btrfs-progs 3.14.1 to confirm issue (1) is resolved. Tested on Xubunut 14.04 LTS and CentOS 7.0 w/ btrfs-progs 3.12 to confirm issue (2) is resolved. Tested of Fedora 20 and CentOS 6.5 to confirm non-problematic versions are still OK. Testing involved checking the partition properties are correct for single and muilt-device btrfs file systems both mounted and unmounted. Passed. Thanks, Mike
Hi Mike, Good work on this latest patch set. For testing I applied the patch set in comment #1 on top of the patch set in bug 723842 comment #36. In my testing I specifically checked to see if the btrfs volume label was shown in both mounted and unmounted states. Distro Result Notes ------------------ ------ ------ debian 6 pass debian 7 pass opensuse 12.3 pass *NOWFIXED opensuse 13.1 pass *NOWFIXED ubuntu 10.04 LTS pass kubuntu 12.04 LTS pass ubuntu 14.04 LTS pass *NOWFIXED Notes ----- *NOWFIXED: Previously if mounted, btrfs volume label would disappear in gparted main window. Works correctly now. Note that I skipped Fedora 19 and 20 since you already tested these. :) If there are no objections, in the next day or so I will commit the patches noted in the following comments: bug 723842 comment #36 comment #1 Curtis
The patch set in comment #1 has been committed to the git repository for inclusion in the next release of GParted. The relevant git commits can be viewed at the following links: Update parsing of btrfs filesystem show for the UUID (#733601) https://git.gnome.org/browse/gparted/commit/?id=82c6265fa5599bd5acfe33abecaa99de150d71e9 Update parsing of btrfs filesystem show for the label (#733601) https://git.gnome.org/browse/gparted/commit/?id=eca732fb0cefe35db76a7ac96145e2004e8eed08 Update parsing of btrfs filesystem show for file system usage (#733601) https://git.gnome.org/browse/gparted/commit/?id=422829ebff7ebee820b25afe35054ceee69579bd Update parsing of btrfs filesystem show for multi-device membership (#733601) https://git.gnome.org/browse/gparted/commit/?id=a4f761e290a32b7dcb43bd4cf3b9da232b9157e5 Thanks again Mike for your efforts to make btrfs support in GParted as robust as possible. Curtis
This enhancement was included in the GParted 0.20.0 release on October 20, 2014.