qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] block: tell drivers about an image resize
Date: Thu, 20 Jan 2011 09:14:17 +0000	[thread overview]
Message-ID: <AANLkTinugTpsbT4TUSHUL20K60N36a8zP7Ukpt=KCR7r@mail.gmail.com> (raw)
In-Reply-To: <20110119170256.GB9819@lst.de>

On Wed, Jan 19, 2011 at 5:02 PM, Christoph Hellwig <hch@lst.de> wrote:
> Extend the change_cb callback with a reason argument, and use it
> to tell drivers about size changes.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: qemu/block.c
> ===================================================================
> --- qemu.orig/block.c   2011-01-18 20:54:45.246021572 +0100
> +++ qemu/block.c        2011-01-18 20:56:54.117255612 +0100
> @@ -645,7 +645,7 @@ int bdrv_open(BlockDriverState *bs, cons
>         /* call the change callback */
>         bs->media_changed = 1;
>         if (bs->change_cb)
> -            bs->change_cb(bs->change_opaque);
> +            bs->change_cb(bs->change_opaque, CHANGE_MEDIA);

Cool, this is much nicer than stashing away state like
bs->media_changed = 1.  I just took a peek to see if we can remove
that field completely but IDE seems to use it internally.

Stefan

  reply	other threads:[~2011-01-20  9:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 17:02 [Qemu-devel] [PATCH 0/3 v2] allow online resizing of block devices Christoph Hellwig
2011-01-19 17:02 ` [Qemu-devel] [PATCH 1/3] block: add resize monitor command Christoph Hellwig
2011-01-20  8:56   ` Stefan Hajnoczi
2011-01-20  9:43     ` Christoph Hellwig
2011-01-19 17:02 ` [Qemu-devel] [PATCH 2/3] block: tell drivers about an image resize Christoph Hellwig
2011-01-20  9:14   ` Stefan Hajnoczi [this message]
2011-01-20  9:44     ` Christoph Hellwig
2011-01-21 10:41   ` Kevin Wolf
2011-01-19 17:03 ` [Qemu-devel] [PATCH 3/3] virtio-blk: tell the guest about size changes Christoph Hellwig
2011-01-19 17:26 ` [Qemu-devel] Re: [PATCH 0/3 v2] allow online resizing of block devices Juan Quintela
2011-01-20  9:42   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2011-01-24 12:32 [Qemu-devel] [PATCH 0/3 v3] " Christoph Hellwig
2011-01-24 12:32 ` [Qemu-devel] [PATCH 2/3] block: tell drivers about an image resize Christoph Hellwig
2011-01-14 16:20 [Qemu-devel] [PATCH 0/3] allow online resizing of block devices Christoph Hellwig
2011-01-14 16:21 ` [Qemu-devel] [PATCH 2/3] block: tell drivers about an image resize Christoph Hellwig
2011-01-14 21:06   ` Ryan Harper
2011-01-17  9:14     ` Christoph Hellwig

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='AANLkTinugTpsbT4TUSHUL20K60N36a8zP7Ukpt=KCR7r@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /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).