aboutsummaryrefslogtreecommitdiffstats
path: root/uts/common/fs/zfs/dmu_object.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-08-12 22:36:02 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-08-12 22:36:02 +0000
commitfa4d80aacbc26c4cb733b42af06bcc8a8f6a602f (patch)
treee3e121f8ad2f0e4a7d84883ca081cb97603641cc /uts/common/fs/zfs/dmu_object.c
parent9210e57c991f7984e818965732fe157e9c5c3f93 (diff)
downloadsrc-fa4d80aacbc26c4cb733b42af06bcc8a8f6a602f.tar.gz
src-fa4d80aacbc26c4cb733b42af06bcc8a8f6a602f.zip
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().
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=286704
Diffstat (limited to 'uts/common/fs/zfs/dmu_object.c')
-rw-r--r--uts/common/fs/zfs/dmu_object.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/uts/common/fs/zfs/dmu_object.c b/uts/common/fs/zfs/dmu_object.c
index 808864a57607..6ca021eecb1d 100644
--- a/uts/common/fs/zfs/dmu_object.c
+++ b/uts/common/fs/zfs/dmu_object.c
@@ -148,6 +148,11 @@ dmu_object_free(objset_t *os, uint64_t object, dmu_tx_t *tx)
return (0);
}
+/*
+ * Return (in *objectp) the next object which is allocated (or a hole)
+ * after *object, taking into account only objects that may have been modified
+ * after the specified txg.
+ */
int
dmu_object_next(objset_t *os, uint64_t *objectp, boolean_t hole, uint64_t txg)
{