Conserve stack in dsl_scan_visit()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 26 Apr 2011 21:56:04 +0000 (14:56 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 26 Apr 2011 22:48:00 +0000 (15:48 -0700)
commit40a39e1103bbbd6908bc1b5cf4af953c7e4706ad
tree7ce38bb8cf7e9112a93f4a29828bc966f4ed37f8
parentb81c4ac9af4f9e8b8c27d8011e3ce608cd04737b
Conserve stack in dsl_scan_visit()

The dsl_scan_visit() function is a little heavy weight taking 464
bytes on the stack.  This can be easily reduced for little cost by
moving zap_cursor_t and zap_attribute_t off the stack and on to the
heap.  After this change dsl_scan_visit() has been reduced in size
by 320 bytes.

This change was made to reduce stack usage in the dsl_scan_sync()
callpath which is recursive and has been observed to overflow the
stack.

Issue #174
module/zfs/dsl_scan.c