qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Qemu-IO : Indentify Guest File access Types
@ 2013-07-06  8:52 Saptarshi Sen
  2013-07-15  2:40 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Saptarshi Sen @ 2013-07-06  8:52 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

Hi,

   Is it possible from qemu userspace to identify what type of file access
( DIRECT or SYNC or ASYNC )the guest is performing on its files also along
with their file-names if possible.

   I tried to trace bdrv events but I am not able to correctly identify.



Regards
Sen

[-- Attachment #2: Type: text/html, Size: 408 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] Qemu-IO : Indentify Guest File access Types
  2013-07-06  8:52 [Qemu-devel] Qemu-IO : Indentify Guest File access Types Saptarshi Sen
@ 2013-07-15  2:40 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-07-15  2:40 UTC (permalink / raw)
  To: Saptarshi Sen; +Cc: qemu-devel

On Sat, Jul 06, 2013 at 04:52:57PM +0800, Saptarshi Sen wrote:
>    Is it possible from qemu userspace to identify what type of file access
> ( DIRECT or SYNC or ASYNC )the guest is performing on its files also along
> with their file-names if possible.
> 
>    I tried to trace bdrv events but I am not able to correctly identify.

No.  QEMU does not have this information because it simply emulates
block devices (disks).  So it just sees "write this buffer to offset
0x12340000" or "read into this buffer from offset 0x12340000".

If guest applications do not use O_DIRECT, then I/O will go through the
guest page cache.  When a read is cached QEMU sees no disk activity at
all since the data is already in guest memory.

O_SYNC usually means a flush request is sent to the disk.  This is
visible at the virtio-blk/IDE/SCSI level that QEMU emulates.

Filenames are not visible since the file system metadata is completely
dependent on the guest operating system and QEMU emulates block devices,
not file systems.

Consider capturing this information inside the guest or using a network
file system, which would allow you to at least see filenames.  Keep in
mind that the guest page cache can service read requests with no network
file system activity.

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-15  2:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-06  8:52 [Qemu-devel] Qemu-IO : Indentify Guest File access Types Saptarshi Sen
2013-07-15  2:40 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).