Hi, I configure my virtual disk like this: disk="tap:aio:/path/to/image,hda,w" And I add some statements about file operation in /xen-4.1.2/tools/blktap/drivers/block-aio.c. Then I use "xl create mycfg.hvm" to start the vm.However,my statements have not been executed. My statements is in the function tdaio_open.During the vm‘s start,isn't the function tdaio_open in /xen-4.1.2/tools/blktap/drivers/block-aio.c called? hxk _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Campbell
2012-Mar-15 08:56 UTC
Re: when is the function tdaio_open in block-aio.c called
On Thu, 2012-03-15 at 03:33 +0000, hxkhust wrote:> Hi, > > I configure my virtual disk like this: > disk="tap:aio:/path/to/image,hda,w" > And I add some statements about file operation > in /xen-4.1.2/tools/blktap/drivers/block-aio.c. > Then I use "xl create mycfg.hvm" to start the vm.However,my statements > have not been executed. > My statements is in the function tdaio_open.During the vm‘s > start,isn't the function tdaio_open > in /xen-4.1.2/tools/blktap/drivers/block-aio.c called?You seem to have patched tools/blktap (AKA blktap1) whereas xl will only use tools/blktap2. You don't say which kernel you are running so it is hard to say which blktap you need. The xen.git 2.6.32 tree only has blktap2 in it. blktap1 and 2 are both supported by classic-Xen patchsets (e.g. SuSE forward ports), some really old kernels support only blktap1. xl will only ever try to use blktap2 though. Newer kernels (e.g. mainline 3.0+) do not have any blktap at all, In this case xl will fallback automatically to using the "qdisk" backend provided by qemu (be aware that the performance of this is not great) Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
At 2012-03-15 16:56:22,"Ian Campbell" <Ian.Campbell@citrix.com> wrote:>On Thu, 2012-03-15 at 03:33 +0000, hxkhust wrote: >> Hi, >> >> I configure my virtual disk like this: >> disk="tap:aio:/path/to/image,hda,w" >> And I add some statements about file operation >> in /xen-4.1.2/tools/blktap/drivers/block-aio.c. >> Then I use "xl create mycfg.hvm" to start the vm.However,my statements >> have not been executed. >> My statements is in the function tdaio_open.During the vm‘s >> start,isn't the function tdaio_open >> in /xen-4.1.2/tools/blktap/drivers/block-aio.c called? > >You seem to have patched tools/blktap (AKA blktap1) whereas xl will only >use tools/blktap2. > >You don't say which kernel you are running so it is hard to say which >blktap you need. > >The xen.git 2.6.32 tree only has blktap2 in it. blktap1 and 2 are both >supported by classic-Xen patchsets (e.g. SuSE forward ports), some >really old kernels support only blktap1. xl will only ever try to use >blktap2 though. > >Newer kernels (e.g. mainline 3.0+) do not have any blktap at all, In >this case xl will fallback automatically to using the "qdisk" backend >provided by qemu (be aware that the performance of this is not great) > >Ian. > >I use linux kernel 3.2.9 as dom0's kernel with xen 4.1.2 installed in fedora 14.My purpose is to trace the process in which the raw format vitual disk image is read.which file is the qdisk backend provided by qemu implemented in?When the raw image is read,which file or which function is called? hxk _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Campbell
2012-Mar-15 09:25 UTC
Re: when is the function tdaio_open in block-aio.c called
On Thu, 2012-03-15 at 09:14 +0000, hxkhust wrote:> I use linux kernel 3.2.9 as dom0''s kernel with xen 4.1.2 installed in > fedora 14.Then I think you have no blktap (1 or 2) and will therefore be using qdisk.> My purpose is to trace the process in which the raw format vitual disk > image is read.which file is the qdisk backend provided by qemu > implemented in?When the raw image is read,which file or which function > is called?I don''t know. 2s grepping suggests it will be tools/qemu-xen-traditional-dir/hw/xen_disk.c. Ian.