c3a893d519
- place binaries in /usr tree (UsrMerge project) - adjust mkinitrd script accordingly - add btrfsck repair options for: - rebuild extent records - fix block group accounting - reset csums for rescue nodatasum mount - prune corrupt extent allocation tree blocks - device scanning fixes for dm and multipath - initrd support: move btrfs device scan after block device setup - documentation updates - add csize for file commpressed size - updated restore utility OBS-URL: https://build.opensuse.org/request/show/108879 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/btrfsprogs?expand=0&rev=26
37 lines
1.0 KiB
Diff
37 lines
1.0 KiB
Diff
From 8ded348cf85fd8572d4ee7fc9d0cad150f4fc2be Mon Sep 17 00:00:00 2001
|
|
From: Chris Mason <chris.mason@oracle.com>
|
|
Date: Tue, 21 Feb 2012 15:33:20 -0500
|
|
Subject: [PATCH 16/18] Btrfs: use /proc/partitions scanning for
|
|
btrfs_scan_for_fsid
|
|
|
|
btrfs_scan_for_fsid is used by open_ctree and by mkfs when it is
|
|
checking for mounted devices. It currently scans all of /dev,
|
|
which is rarely the right answer.
|
|
|
|
Signed-off-by: Chris Mason <chris.mason@oracle.com>
|
|
---
|
|
utils.c | 7 ++++++-
|
|
1 files changed, 6 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/utils.c b/utils.c
|
|
index cfb8fde..2d82342 100644
|
|
--- a/utils.c
|
|
+++ b/utils.c
|
|
@@ -1052,7 +1052,12 @@ fail:
|
|
int btrfs_scan_for_fsid(struct btrfs_fs_devices *fs_devices, u64 total_devs,
|
|
int run_ioctls)
|
|
{
|
|
- return btrfs_scan_one_dir("/dev", run_ioctls);
|
|
+ int ret;
|
|
+
|
|
+ ret = btrfs_scan_block_devices(run_ioctls);
|
|
+ if (ret)
|
|
+ ret = btrfs_scan_one_dir("/dev", run_ioctls);
|
|
+ return ret;
|
|
}
|
|
|
|
int btrfs_device_already_in_root(struct btrfs_root *root, int fd,
|
|
--
|
|
1.7.6.233.gd79bc
|
|
|