summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2013-12-27 13:56:29 +0800
committerChris Mason <clm@fb.com>2014-01-31 08:22:22 -0800
commit62d02453e40ff1ab8d942853fa4919a54eaf4f90 (patch)
tree4a1d3645389080323b57f941a665c56bdbc61f22 /utils.c
parentd89437893266332cce295c06c9d00b79aa5b4dd6 (diff)
btrfs-progs: test_skip_this_disk() isn't needed anymore
add_seen_fsid() which was introduced lately will eliminate the mounted disks, so we don't need test_skip_this_disk() anymore Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/utils.c b/utils.c
index ad78a7f2..75b37f39 100644
--- a/utils.c
+++ b/utils.c
@@ -1967,21 +1967,6 @@ int test_dev_for_mkfs(char *file, int force_overwrite, char *estr)
return 0;
}
-static int test_skip_this_disk(char *path)
-{
- int fd;
-
- /*
- * this will eliminate disks which are mounted (btrfs)
- * and non-dm disk path when dm is enabled
- */
- fd = open(path, O_RDWR|O_EXCL);
- if (fd < 0)
- return 1;
- close(fd);
- return 0;
-}
-
int btrfs_scan_lblkid(int update_kernel)
{
int fd = -1;
@@ -2006,8 +1991,6 @@ int btrfs_scan_lblkid(int update_kernel)
continue;
/* if we are here its definitely a btrfs disk*/
strncpy(path, blkid_dev_devname(dev), PATH_MAX);
- if (test_skip_this_disk(path))
- continue;
fd = open(path, O_RDONLY);
if (fd < 0) {