1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Comment out some pointless device open/close around reading device IDs.

FreeBSD ZFS port unlike OpenSolaris does not use device IDs, and does not
implement respective devid_*() fuctions.  It is pointless to open devices
just to close them back immediately.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
This commit is contained in:
Alexander Motin 2014-05-10 15:21:37 +00:00
parent 6ed8e454a1
commit 7585c68486
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265821
3 changed files with 10 additions and 0 deletions

View File

@ -512,6 +512,7 @@ make_leaf_vdev(const char *arg, uint64_t is_log)
verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK,
(uint64_t)wholedisk) == 0);
#ifdef have_devid
/*
* For a whole disk, defer getting its devid until after labeling it.
*/
@ -546,6 +547,7 @@ make_leaf_vdev(const char *arg, uint64_t is_log)
(void) close(fd);
}
#endif
return (vdev);
}

View File

@ -94,6 +94,7 @@ typedef struct pool_list {
static char *
get_devid(const char *path)
{
#ifdef have_devid
int fd;
ddi_devid_t devid;
char *minor, *ret;
@ -113,6 +114,9 @@ get_devid(const char *path)
(void) close(fd);
return (ret);
#else
return (NULL);
#endif
}

View File

@ -3324,6 +3324,7 @@ devid_to_path(char *devid_str)
static char *
path_to_devid(const char *path)
{
#ifdef have_devid
int fd;
ddi_devid_t devid;
char *minor, *ret;
@ -3343,6 +3344,9 @@ path_to_devid(const char *path)
(void) close(fd);
return (ret);
#else
return (NULL);
#endif
}
/*