]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
5960 zfs recv should prefetch indirect blocks
authormav <mav@FreeBSD.org>
Wed, 12 Aug 2015 22:36:02 +0000 (22:36 +0000)
committermav <mav@FreeBSD.org>
Wed, 12 Aug 2015 22:36:02 +0000 (22:36 +0000)
commitfa45fdeca1344cfcb3b93252af1520dac8f43d56
tree9eef9f6b8de29802db3d4f04e2da790f3ebe8a7a
parentf234199f863592dd7e9cad9c9e0dae2ce084cea8
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().
cmd/zdb/zdb.c
cmd/zfs/zfs_main.c
cmd/ztest/ztest.c
lib/libzfs/common/libzfs.h
lib/libzfs/common/libzfs_pool.c
lib/libzfs/common/libzfs_sendrecv.c
lib/libzpool/common/sys/zfs_context.h