aboutsummaryrefslogtreecommitdiffstats
path: root/uts/common/fs/zfs/dmu_object.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2018-08-02 19:37:13 +0000
committerAlexander Motin <mav@FreeBSD.org>2018-08-02 19:37:13 +0000
commit58d5696e1c7576cccd9973867116f84bea72563d (patch)
tree9eb1d09feaab865fd968c2a563d2f6ae3cfd9a74 /uts/common/fs/zfs/dmu_object.c
parentcf8fc527c9dc27e9e99a28c0c621bed2a74bc203 (diff)
downloadsrc-58d5696e1c7576cccd9973867116f84bea72563d.tar.gz
src-58d5696e1c7576cccd9973867116f84bea72563d.zip
9442 decrease indirect block size of spacemaps
Updates to indirect blocks of spacemaps can contribute significantly to write inflation. Therefore we want to reduce the indirect block size of spacemaps from 128K to 16K. illumos/illumos-gate@221813c13b43ef48330b03725e00edee85108cf1 Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Albert Lee <trisk@forkgnu.org> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Dan McDonald <danmcd@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=337167
Diffstat (limited to 'uts/common/fs/zfs/dmu_object.c')
-rw-r--r--uts/common/fs/zfs/dmu_object.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/uts/common/fs/zfs/dmu_object.c b/uts/common/fs/zfs/dmu_object.c
index 9f0f2b437c36..aede315502d9 100644
--- a/uts/common/fs/zfs/dmu_object.c
+++ b/uts/common/fs/zfs/dmu_object.c
@@ -32,7 +32,8 @@
#include <sys/zfeature.h>
uint64_t
-dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize,
+dmu_object_alloc_ibs(objset_t *os, dmu_object_type_t ot, int blocksize,
+ int indirect_blockshift,
dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx)
{
uint64_t object;
@@ -92,7 +93,8 @@ dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize,
os->os_obj_next = object - 1;
}
- dnode_allocate(dn, ot, blocksize, 0, bonustype, bonuslen, tx);
+ dnode_allocate(dn, ot, blocksize, indirect_blockshift,
+ bonustype, bonuslen, tx);
mutex_exit(&os->os_obj_lock);
dmu_tx_add_new_object(tx, dn);
@@ -101,6 +103,14 @@ dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize,
return (object);
}
+uint64_t
+dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize,
+ dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx)
+{
+ return (dmu_object_alloc_ibs(os, ot, blocksize, 0,
+ bonustype, bonuslen, tx));
+}
+
int
dmu_object_claim(objset_t *os, uint64_t object, dmu_object_type_t ot,
int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx)