From 70ddc1393f7ac3bedd7680dadfb40657d6464c93 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 18 Dec 2009 14:22:02 -0800 Subject: [PATCH] No inline to keep dmu_recv_stream() stack frame less than 1024 bytes. Recent builds against 2.6.31 flagged dmu_recv_stream() as stack heavy. As a quick simple way to resolve this I'm preventing the inlining of certain functions which gcc will inline here because this is the only place they are called. Futher analysis of this function should be performed to futher reduce its stack usage. --- module/zfs/dmu_send.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index ce59aac508..266f35ad98 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -689,7 +689,7 @@ restore_read(struct restorearg *ra, int len) return (rv); } -static void +noinline static void backup_byteswap(dmu_replay_record_t *drr) { #define DO64(X) (drr->drr_u.X = BSWAP_64(drr->drr_u.X)) @@ -740,7 +740,7 @@ backup_byteswap(dmu_replay_record_t *drr) #undef DO32 } -static int +noinline static int restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro) { int err; @@ -822,7 +822,7 @@ restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro) } /* ARGSUSED */ -static int +noinline static int restore_freeobjects(struct restorearg *ra, objset_t *os, struct drr_freeobjects *drrfo) { @@ -846,7 +846,7 @@ restore_freeobjects(struct restorearg *ra, objset_t *os, return (0); } -static int +noinline static int restore_write(struct restorearg *ra, objset_t *os, struct drr_write *drrw) { @@ -883,7 +883,7 @@ restore_write(struct restorearg *ra, objset_t *os, } /* ARGSUSED */ -static int +noinline static int restore_free(struct restorearg *ra, objset_t *os, struct drr_free *drrf) {