Fix __zio_execute() asynchronous dispatch
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 18 Dec 2012 00:23:27 +0000 (16:23 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 8 Jan 2013 18:35:43 +0000 (10:35 -0800)
commit91579709fccd3e55a21970742b66c388fb1403db
treec581f69220bbd43aa104a5e59bb47aa2fe523f4c
parentea0b2538cd5967fcdf26b7b7c01859a060fef3e3
Fix __zio_execute() asynchronous dispatch

To save valuable stack all zio's were made asynchronous when in the
tgx_sync_thread context or during pool initialization.  See commit
2fac4c2 for the original patch and motivation.

Unfortuantely, the changes to dsl_pool_sync_context() made by the
feature flags broke this logic causing in __zio_execute() to dispatch
itself infinitely when called during pool initialization.  This
commit refines the existing logic to specificly target only the two
cases we care about.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/zio.c