Skip to contentSkip to conversation

when is the function tdaio_open in block-aio.c called

DISCUSSION hxkhust 2 participants 4 messages Mar 15, 2012

lore
Share & tools
lore

hxkhust

author
#0 lore raw

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
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 11 lines · hxkhust

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
[email protected]
http://lists.xen.org/xen-devel

author
#2 lore raw
Quoted 24 lines · At 2012-03-15 16:56:22,"Ian Campbell" <[email protected]> wrote:
Quoted 11 lines · hxkhust

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.

Quoted 7 lines

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
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 2 lines · hxkhust

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.

Quoted 4 lines

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.