zfs_ioctl.c: improve code readability in zfs_ioc_dataset_list_next()
zvol.c: fix calling of dmu_objset_prefetch() in zvol_create_minors() by passing full instead of relative dataset name and prefetching all visible datasets to be processed later instead of just the pool name Reviewed by: pjd Approved by: re (kib) MFC after: 1 week > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M opensolaris/uts/common/fs/zfs/zfs_ioctl.c M opensolaris/uts/common/fs/zfs/zvol.c
This commit is contained in:
parent
9343c74977
commit
d76f038194
@ -1963,9 +1963,10 @@ zfs_ioc_dataset_list_next(zfs_cmd_t *zc)
|
||||
uint64_t cookie = 0;
|
||||
int len = sizeof (zc->zc_name) - (p - zc->zc_name);
|
||||
|
||||
while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0)
|
||||
if (dataset_name_hidden(zc->zc_name) == B_FALSE)
|
||||
while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) {
|
||||
if (!dataset_name_hidden(zc->zc_name))
|
||||
(void) dmu_objset_prefetch(zc->zc_name, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
|
@ -2197,11 +2197,11 @@ zvol_create_minors(const char *name)
|
||||
p = osname + strlen(osname);
|
||||
len = MAXPATHLEN - (p - osname);
|
||||
|
||||
if (strchr(name, '/') == NULL) {
|
||||
/* Prefetch only for pool name. */
|
||||
cookie = 0;
|
||||
while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0)
|
||||
(void) dmu_objset_prefetch(p, NULL);
|
||||
/* Prefetch the datasets. */
|
||||
cookie = 0;
|
||||
while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) {
|
||||
if (!dataset_name_hidden(osname))
|
||||
(void) dmu_objset_prefetch(osname, NULL);
|
||||
}
|
||||
|
||||
cookie = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user