From: Alex Davis <alex14641@yahoo.com>
To: David Ahern <dsahern@gmail.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>, kvm@vger.kernel.org
Subject: Re: CD-ROM size not updated when switching CD-ROM images.
Date: Sat, 30 Oct 2010 13:32:19 -0700 (PDT) [thread overview]
Message-ID: <147014.52223.qm@web50203.mail.re2.yahoo.com> (raw)
In-Reply-To: <4CBF1C5F.1070406@gmail.com>
--- On Wed, 10/20/10, David Ahern <dsahern@gmail.com> wrote:
> From: David Ahern <dsahern@gmail.com>
> Subject: Re: CD-ROM size not updated when switching CD-ROM images.
> To: "Alex Davis" <alex14641@yahoo.com>
> Cc: "Stefan Hajnoczi" <stefanha@gmail.com>, kvm@vger.kernel.org
> Date: Wednesday, October 20, 2010, 12:44 PM
>
>
> On 10/19/10 18:03, Alex Davis wrote:
>
> >> You ejected the CD-ROM on the QEMU side, the guest
> doesn't
> >> necessarily
> >> know about the medium change. What happens
> when you
> >> use "eject
> >> /dev/sr0" inside the guest instead?
> > I get a 'no medium found' error from the 'dd..'
> command. After
> > going into the the monitor, ejecting and reloading the
> disk,
> > I still get the size of the first disk in the guest.
>
> As I recall the old data is coming from the host page
> cache; it is not
> seeing the media change. Try dropping the cache in the host
> on a media
> change (echo 3 > /proc/sys/vm/drop_caches) or modify
> qemu to close and
> reopen the cdrom device.
>
> David
I am able to reproduce this problem with just a plain kernel using the
ata_piix driver, an initrd that just starts a shell, and plain qemu.
When the disk is changed via the monitor, the guest invokes the error-
handling code on the next read of the CD-ROM, but the code path doesn't
trigger the 'update size' logic. I did an experiment where I placed the
line 'sdev->changed = 1' in the sr_open method in sr.c of the guest
kernel source, the size was updated, but I will look to see if there's
something in qemu that can be changed to make it work properly.
Of course any input from the qemu/kvm developers is appreciated.
I code, therefore I am
>
> >>
> >> I don't know how CD-ROM media change works on
> real
> >> hardware, but that
> >> is the behavior that QEMU should be following.
> >>
> >> Stefan
> >
> >
> >
> > --
> > To unsubscribe from this list: send the line
> "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
next prev parent reply other threads:[~2010-10-30 20:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 3:43 CD-ROM size not updated when switching CD-ROM images Alex Davis
2010-10-19 8:31 ` Stefan Hajnoczi
2010-10-20 0:03 ` Alex Davis
2010-10-20 16:44 ` David Ahern
2010-10-20 23:28 ` Alex Davis
2010-10-30 20:32 ` Alex Davis [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-10-20 12:50 Alex Davis
2010-10-30 21:24 Alex Davis
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=147014.52223.qm@web50203.mail.re2.yahoo.com \
--to=alex14641@yahoo.com \
--cc=dsahern@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=stefanha@gmail.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