K 10 svn:author V 3 imp K 8 svn:date V 27 2017-12-19T04:13:22.119289Z K 7 svn:log V 552 When doing a dump, the scheduler is normally not running, so this changed worked to capture dumps for me. However, the test for SCHEDULER_STOPPED() isn't right. We can also call the dump routine from ddb, in which case the scheduler is still running. This leads to an assertion panic that we're sleeping when we shouldn't. Instead, use the proper test for dumping or not. This brings us in line with other places that do special things while we're doing polled I/O like this. Noticed by: pho@ Differential Revision: https://reviews.freebsd.org/D13531 END