From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJueg-0005uf-Ks for qemu-devel@nongnu.org; Tue, 06 Nov 2018 01:16:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJueb-0001dw-N8 for qemu-devel@nongnu.org; Tue, 06 Nov 2018 01:16:02 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:33942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJueb-0001dc-F2 for qemu-devel@nongnu.org; Tue, 06 Nov 2018 01:15:57 -0500 References: From: Dongli Zhang Message-ID: Date: Tue, 6 Nov 2018 14:17:46 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] How to emulate block I/O timeout on qemu side? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , jsnow@redhat.com Cc: qemu-devel@nongnu.org, libguestfs On 11/06/2018 01:49 AM, Eric Blake wrote: > On 11/2/18 3:11 AM, Dongli Zhang wrote: >> Hi, >> >> Is there any way to emulate I/O timeout on qemu side (not fault injection in VM >> kernel) without modifying qemu source code? > > You may be interested in Rich's work on nbdkit. If you don't mind the overhead > of the host connecting through NBD, then you can use nbdkit's delay and > fault-injection filters for inserting delays or even run-time-controllable > failures to investigate how the guest reacts to those situations Thank you all very much for the suggestions. I will take a look on nbdkit. So far I am reproducing the issue with NFS (by shutdown the link to NFS where the image is placed on purpose) but it did not work well. > >> >> For instance, I would like to observe/study/debug the I/O timeout handling of >> nvme, scsi, virtio-blk (not supported) of VM kernel. >> >> Is there a way to trigger this on purpose on qemu side? >> >> Thank you very much! >> >> Dongli Zhang >> >> > Dongli Zhang