From 1c1ac30d93799529f06b713c223c9460482be7f9 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 20 Aug 2014 17:23:20 -0500 Subject: btrfs-progs: don't fall back to recursive /dev scan If we didn't find what we are looking for in /proc/partitions, we're not going to find it by scanning every node under /dev, either. But that's just what btrfs_scan_for_fsid() does. Remove that fallback; at that point btrfs_scan_for_fsid() just calls scan_for_btrfs(), so remove the wrapper & call it directly. Side note: so, these paths always use /proc/partitions, not libblkid. Userspace-intiated scans default to libblkid. I presume this is part of the design, and intentional? Anyway, not changing it now! Signed-off-by: Eric Sandeen Reviewed-by: Anand Jain Signed-off-by: David Sterba --- disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'disk-io.c') diff --git a/disk-io.c b/disk-io.c index 34c0a972..e0e77015 100644 --- a/disk-io.c +++ b/disk-io.c @@ -1002,7 +1002,7 @@ int btrfs_scan_fs_devices(int fd, const char *path, } if (total_devs != 1) { - ret = btrfs_scan_for_fsid(run_ioctl); + ret = scan_for_btrfs(BTRFS_SCAN_PROC, run_ioctl); if (ret) return ret; } -- cgit v1.2.3