Bug 816293

Summary: btrfs filesystem show UUID shows nothing
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: btrfs-progsAssignee: Josef Bacik <josef>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: jbacik, josef, mmahut
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-25 18:32:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2012-04-25 18:01:01 UTC
Description of problem:

According to the docs, the command 'btrfs filesystem show UUID'
should show a single mountpoint, whereas 'btrfs filesystem show'
shows all mountpoints.

However the former doesn't appear to work:

# btrfs filesystem show 5e8f4c3a-f6f9-4451-a3f1-b80f26a36c03
Btrfs Btrfs v0.19

whereas the latter works ok (displaying all mountpoints):

# btrfs filesystem show  
Label: none  uuid: 5e8f4c3a-f6f9-4451-a3f1-b80f26a36c03
	Total devices 4 FS bytes used 28.00KB
	devid    1 size 1023.00MB used 437.06MB path /dev/vda1
	devid    2 size 1023.00MB used 422.25MB path /dev/vdb1
	devid    3 size 1023.00MB used 524.56MB path /dev/vdc1
	devid    4 size 1023.00MB used 524.56MB path /dev/vdd1

Btrfs Btrfs v0.19

Also the former command exits with code 0, but presumably if
it is failing to find the UUID it should exit with a non-zero
code.

Version-Release number of selected component (if applicable):

btrfs-progs-0.19-17.fc17.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 1 Josef Bacik 2012-04-25 18:32:44 UTC
fixed and building a package.

http://koji.fedoraproject.org/koji/taskinfo?taskID=4022881

Comment 2 Richard W.M. Jones 2012-04-25 19:30:15 UTC
I have tested this package and it works:

# btrfs filesystem show 4502dcfb-4f47-432f-a443-a7eadd8fb263
Label: none  uuid: 4502dcfb-4f47-432f-a443-a7eadd8fb263
	Total devices 1 FS bytes used 28.00KB
	devid    1 size 1023.00MB used 12.00MB path /dev/vda1

Btrfs Btrfs v0.19


It would be nice if the result of an invalid uuid was a
non-zero exit code, eg:

# btrfs filesystem show 123456                           
Btrfs Btrfs v0.19
# echo $?
0