qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Amit Shah <amit.shah@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Ryan Harper <ryanh@us.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/3] trace: Trace bdrv_set_locked()
Date: Wed, 23 Mar 2011 17:40:53 +0000	[thread overview]
Message-ID: <1300902055-25850-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1300902055-25850-1-git-send-email-stefanha@linux.vnet.ibm.com>

It can be handy to know when the guest locks/unlocks the CD-ROM tray.
This trace event makes that possible.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 block.c      |    2 ++
 trace-events |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/block.c b/block.c
index b476479..8f224b4 100644
--- a/block.c
+++ b/block.c
@@ -2696,6 +2696,8 @@ void bdrv_set_locked(BlockDriverState *bs, int locked)
 {
     BlockDriver *drv = bs->drv;
 
+    trace_bdrv_set_locked(bs, locked);
+
     bs->locked = locked;
     if (drv && drv->bdrv_set_locked) {
         drv->bdrv_set_locked(bs, locked);
diff --git a/trace-events b/trace-events
index e6138ea..f87f683 100644
--- a/trace-events
+++ b/trace-events
@@ -53,6 +53,7 @@ disable bdrv_aio_multiwrite_earlyfail(void *mcb) "mcb %p"
 disable bdrv_aio_multiwrite_latefail(void *mcb, int i) "mcb %p i %d"
 disable bdrv_aio_readv(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p"
 disable bdrv_aio_writev(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p"
+disable bdrv_set_locked(void *bs, int locked) "bs %p locked %d"
 
 # hw/virtio-blk.c
 disable virtio_blk_req_complete(void *req, int status) "req %p status %d"
-- 
1.7.4.1

  reply	other threads:[~2011-03-23 17:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 17:40 [Qemu-devel] [PATCH 0/3] block: Correct size across CD-ROM media change Stefan Hajnoczi
2011-03-23 17:40 ` Stefan Hajnoczi [this message]
2011-03-23 17:40 ` [Qemu-devel] [PATCH 2/3] block: Do not cache device size for removable media Stefan Hajnoczi
2011-03-23 20:18   ` [Qemu-devel] " Juan Quintela
2011-03-23 20:46     ` Stefan Hajnoczi
2011-03-23 17:40 ` [Qemu-devel] [PATCH 3/3] raw-posix: Re-open host CD-ROM after media change Stefan Hajnoczi
2011-03-23 20:27   ` [Qemu-devel] " Juan Quintela
2011-03-23 20:50     ` Stefan Hajnoczi
2011-03-24 12:42       ` Kevin Wolf
2011-03-24 19:00         ` Stefan Hajnoczi
2011-03-24 21:23           ` Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300902055-25850-2-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).