btrfs-progs: scan /proc/partitions not all of /dev with "-d"
authorEric Sandeen <sandeen@redhat.com>
Wed, 20 Aug 2014 22:22:13 +0000 (17:22 -0500)
committerDavid Sterba <dsterba@suse.cz>
Fri, 10 Oct 2014 07:32:11 +0000 (09:32 +0200)
commit4e85e481887abba8141ff43597c09b5f91d70ee4
tree87ba73c818ff1749fcc403474bf96c7c7b0bbd81
parent6420192e870cedb3f43dac2095ce9fd7729a63e3
btrfs-progs: scan /proc/partitions not all of /dev with "-d"

We can scan for btrfs devices in a few ways.  By default
libblkid is used for "device scan" and "filesystem show";
with the -m option only mounted filesystems are scanned,
and with -d we physically read every system device.

But there's no reason for the complexity of a descent through
/dev; /proc/partitions has every device known to the kernel, so
just use that when -d is specified.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-device.c
cmds-filesystem.c