diff options
author | mm <mm@FreeBSD.org> | 2011-08-13 10:58:53 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-08-13 10:58:53 +0000 |
commit | 2b43fcac26ac057e532df722d383c36acf832962 (patch) | |
tree | c24a834da210cf295669fc4bf9515e37f941a4d3 | |
parent | 09f5070c506b517e40094df7ec1f82570c6e18b6 (diff) | |
download | FreeBSD-src-2b43fcac26ac057e532df722d383c36acf832962.zip FreeBSD-src-2b43fcac26ac057e532df722d383c36acf832962.tar.gz |
Fix race between dmu_objset_prefetch() invoked from
zfs_ioc_dataset_list_next() and dsl_dir_destroy_check() indirectly
invoked from dmu_recv_existing_end() via dsl_dataset_destroy() by not
prefetching temporary clones, as these count as always inconsistent.
In addition, do not prefetch hidden datasets at all as we are not
going to process these later.
Filed as Illumos Bug #1346
PR: kern/157728
Tested by: Borja Marcos <borjam@sarenet.es>, mm
Reviewed by: pjd
Approved by: re (kib)
MFC after: 1 week
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c | 3 |
1 files changed, 2 insertions, 1 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 ff5d40e..dbaa277 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 @@ -1964,7 +1964,8 @@ top: int len = sizeof (zc->zc_name) - (p - zc->zc_name); while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) - (void) dmu_objset_prefetch(zc->zc_name, NULL); + if (dataset_name_hidden(zc->zc_name) == B_FALSE) + (void) dmu_objset_prefetch(zc->zc_name, NULL); } do { |