From 526d004cf5b8bf0456650508116713bf6bb9fa61 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Thu, 29 Jul 2010 13:35:56 -0700 Subject: [PATCH] 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 --- module/zfs/dbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index 42ae439972..248bee18bf 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -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) {