summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2011-08-13 21:35:22 +0000
committermm <mm@FreeBSD.org>2011-08-13 21:35:22 +0000
commitd76f0381941fb96e2cbcfd52036dbf6e4f9363a9 (patch)
tree6b3d0e3f7f56fd7d5a1fd3689ac2518316bded6e /sys/cddl
parent9343c749772c8366f4dba21a1b388a2e9f69322b (diff)
downloadFreeBSD-src-d76f0381941fb96e2cbcfd52036dbf6e4f9363a9.zip
FreeBSD-src-d76f0381941fb96e2cbcfd52036dbf6e4f9363a9.tar.gz
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
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c5
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
index dbaa277..17174b2 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
@@ -1963,9 +1963,10 @@ top:
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 {
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
index f9789f8..61c96be 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
@@ -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;
OpenPOWER on IntegriCloud