diff mbox

btrfs-progs: test_skip_this_disk() isn't needed anymore

Message ID 1388123789-20522-1-git-send-email-anand.jain@oracle.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Anand Jain Dec. 27, 2013, 5:56 a.m. UTC
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>
---
 utils.c |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)
diff mbox

Patch

diff --git a/utils.c b/utils.c
index d505184..de513b6 100644
--- a/utils.c
+++ b/utils.c
@@ -1968,21 +1968,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;
@@ -2007,8 +1992,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) {