Inline dbuf_findbp() to reduce stack use

Deep recursive call chains are contributing to segfaults in ztest due
to heavy stack use.  Inlining dbuf_findbp() helps reduce the stack depth
of the dbuf_findbp() -> dbuf_hold_impl() cycle.  However, segfaults are
still occurring in this code path, so further reductions are still needed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Ned Bass 2010-07-29 13:35:56 -07:00 committed by Brian Behlendorf
parent dd72f3d647
commit 526d004cf5
1 changed files with 2 additions and 1 deletions

View File

@ -1490,7 +1490,8 @@ dbuf_clear(dmu_buf_impl_t *db)
dbuf_rele(parent, db);
}
static int
__attribute__((always_inline))
static inline int
dbuf_findbp(dnode_t *dn, int level, uint64_t blkid, int fail_sparse,
dmu_buf_impl_t **parentp, blkptr_t **bpp)
{