btrfs-progs: device scan: rename is_path_device

The term 'path' is confusing as we normally use it for filesystem paths,
while for multipath it's more related to the physical path by which the
devices are connected (though it also shows up as another path in the
filesystem).

Rename the helper doing the multipath detection so it's clear what path
is meant by that.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2021-10-05 14:27:30 +02:00
parent 1b7128c152
commit c6c2e3da0a

View File

@ -374,7 +374,7 @@ void free_seen_fsid(struct seen_fsid *seen_fsid_hash[])
}
#ifdef STATIC_BUILD
static bool is_path_device(dev_t device)
static bool is_multipath_path_device(dev_t device)
{
FILE *file;
char *line = NULL;
@ -409,7 +409,7 @@ static bool is_path_device(dev_t device)
return ret;
}
#elif defined(HAVE_LIBUDEV)
static bool is_path_device(dev_t device)
static bool is_multipath_path_device(dev_t device)
{
struct udev *udev = NULL;
struct udev_device *dev = NULL;
@ -434,7 +434,7 @@ out:
return ret;
}
#else
static bool is_path_device(dev_t device)
static bool is_multipath_path_device(dev_t device)
{
return false;
}
@ -475,7 +475,7 @@ int btrfs_scan_devices(int verbose)
if (stat(path, &dev_stat) < 0)
continue;
if (is_path_device(dev_stat.st_rdev))
if (is_multipath_path_device(dev_stat.st_rdev))
continue;
fd = open(path, O_RDONLY);