diff options
author | mav <mav@FreeBSD.org> | 2015-10-03 08:03:36 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-03 08:03:36 +0000 |
commit | b50fb3b80398131dea6df0915424a6f81292afb4 (patch) | |
tree | 4db32b46e47d3c4e0243a2986a151c66d7f4a454 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | |
parent | d80d916b9a160f1eb050815c6d913c56d6155a75 (diff) | |
download | FreeBSD-src-b50fb3b80398131dea6df0915424a6f81292afb4.zip FreeBSD-src-b50fb3b80398131dea6df0915424a6f81292afb4.tar.gz |
MFC r286705: 5960 zfs recv should prefetch indirect blocks
5925 zfs receive -o origin=
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>
While running 'zfs recv' we noticed that every 128th 8K block required a
read. We were seeing that restore_write() was calling dmu_tx_hold_write()
and the indirect block was not cached. We should prefetch upcoming indirect
blocks to avoid having to go to disk and blocking the restore_write().
Allow an incremental send stream to be received as a clone, even if the
stream does not mark it as a clone.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 554fbd1..491c365 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -359,7 +359,7 @@ zvol_map_block(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, zvol_extent_t *ze; int bs = ma->ma_zv->zv_volblocksize; - if (BP_IS_HOLE(bp) || + if (bp == NULL || BP_IS_HOLE(bp) || zb->zb_object != ZVOL_OBJ || zb->zb_level != 0) return (0); |