equal
deleted
inserted
replaced
17 * information: Portions Copyright [yyyy] [name of copyright owner] |
17 * information: Portions Copyright [yyyy] [name of copyright owner] |
18 * |
18 * |
19 * CDDL HEADER END |
19 * CDDL HEADER END |
20 */ |
20 */ |
21 /* |
21 /* |
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. |
23 * Use is subject to license terms. |
24 */ |
24 */ |
25 |
25 |
26 #include <sys/zfs_context.h> |
26 #include <sys/zfs_context.h> |
27 #include <sys/dmu_objset.h> |
27 #include <sys/dmu_objset.h> |
269 ASSERT(pfd->pd_blks_fetched >= 0); |
269 ASSERT(pfd->pd_blks_fetched >= 0); |
270 if (pfd->pd_cancel) |
270 if (pfd->pd_cancel) |
271 return (EINTR); |
271 return (EINTR); |
272 |
272 |
273 if (bp == NULL || !((pfd->pd_flags & TRAVERSE_PREFETCH_DATA) || |
273 if (bp == NULL || !((pfd->pd_flags & TRAVERSE_PREFETCH_DATA) || |
274 BP_GET_TYPE(bp) == DMU_OT_DNODE || BP_GET_LEVEL(bp) > 0)) |
274 BP_GET_TYPE(bp) == DMU_OT_DNODE || BP_GET_LEVEL(bp) > 0) || |
|
275 BP_GET_TYPE(bp) == DMU_OT_INTENT_LOG) |
275 return (0); |
276 return (0); |
276 |
277 |
277 mutex_enter(&pfd->pd_mtx); |
278 mutex_enter(&pfd->pd_mtx); |
278 while (!pfd->pd_cancel && pfd->pd_blks_fetched >= pfd->pd_blks_max) |
279 while (!pfd->pd_cancel && pfd->pd_blks_fetched >= pfd->pd_blks_max) |
279 cv_wait(&pfd->pd_cv, &pfd->pd_mtx); |
280 cv_wait(&pfd->pd_cv, &pfd->pd_mtx); |