From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8nc3-0002FS-IV for qemu-devel@nongnu.org; Mon, 21 Nov 2016 07:22:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8nc2-0006r1-Kw for qemu-devel@nongnu.org; Mon, 21 Nov 2016 07:22:19 -0500 From: "Pavel Dovgalyuk" References: <20160926080838.6992.95614.stgit@PASHA-ISP> <20160926092346.GE6093@noname.str.redhat.com> <002001d217db$845fc030$8d1f4090$@ru> <20160926131721.GH6093@noname.str.redhat.com> <001101d218c8$67aa1010$36fe3030$@ru> <20160928083620.GD5236@noname.redhat.com> <001501d2196b$496b4e90$dc41ebb0$@ru> <20160928094313.GI5236@noname.redhat.com> <000001d21986$b68cd280$23a67780$@ru> <001d01d23fee$b962ec40$2c28c4c0$@ru> <20161116122001.GA5407@noname.str.redhat.com> In-Reply-To: <20161116122001.GA5407@noname.str.redhat.com> Date: Mon, 21 Nov 2016 15:22:10 +0300 Message-ID: <001b01d243f1$e2313260$a6939720$@ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH v5 7/9] block: don't make snapshots for filters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Kevin Wolf' Cc: 'Pavel Dovgalyuk' , qemu-devel@nongnu.org, peter.maydell@linaro.org, quintela@redhat.com, jasowang@redhat.com, mst@redhat.com, pbonzini@redhat.com, mreitz@redhat.com, qemu-block@nongnu.org > From: Kevin Wolf [mailto:kwolf@redhat.com] > Am 16.11.2016 um 10:49 hat Pavel Dovgalyuk geschrieben: > > > From: Pavel Dovgalyuk [mailto:dovgaluk@ispras.ru] > > > > I've investigated this issue. > > This command line works ok: > > -drive driver=blkreplay,if=none,image.driver=file,image.filename=testdisk.qcow,id=img- > blkreplay > > -device ide-hd,drive=img-blkreplay > > > > And this does not: > > -drive > > > driver=blkreplay,if=none,image.driver=qcow2,image.file.driver=file,image.file.filename=testdis > k.qcow > > ,id=img-blkreplay > > -device ide-hd,drive=img-blkreplay > > > > QEMU hangs at some moment of replay. > > > > I found that some dma requests do not pass through the blkreplay driver > > due to the following line in block-backend.c: > > return bdrv_co_preadv(blk->root, offset, bytes, qiov, flags); > > > > This line passes read request directly to qcow driver and blkreplay cannot > > process it to make deterministic. > > How does that bypass blkreplay? blk->root is supposed to be the blkreply > node, do you see something different? If it were the qcow2 node, then I > would expect that no requests at all go through the blkreplay layer. It seems, that the problem is in -snapshot option. We have one of the following block layers depending on command line: tmp_overlay1 -> blkreplay -> tmp_overlay2 -> disk_image tmp_overlay1 -> blkreplay -> disk_image But the correct scheme is intended to be the following: blkreplay -> tmp_overlay1 -> disk_image How can we fix it? Maybe we should add blkreplay automatically to all block devices and not to specify it in the command line? Pavel Dovgalyuk