All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Antoine Martin <antoine@nagafix.co.uk>
Cc: kvm@vger.kernel.org, Christoph Hellwig <hch@infradead.org>
Subject: Re: raw disks no longer work in latest kvm (kvm-88 was fine)
Date: Sun, 07 Mar 2010 18:15:05 +0300	[thread overview]
Message-ID: <4B93C2F9.7030904@msgid.tls.msk.ru> (raw)
In-Reply-To: <4B93AF8A.3070805@nagafix.co.uk>

Antoine Martin wrote:
> [snip]
>>
>> So there is something else at play. And just for the record:
>> 1) kvm-88 works fine *with the exact same setup*
>> 2) I've tried running as root
>> 3) The raw disk mounts fine from the host.
>> So I *know* the problem is with kvm. I wouldn't post to the list
>> without triple checking that.
>>
>> I have also just tested with another raw partition which is much
>> smaller (1GB) and the same thing still occurs: kvm-88 works and
>> qemu-kvm-0.12.3 does not.
>> So I think that it is fair to assume that this new problem is
>> unrelated to the partition size.
> I have narrowed it down to the "io-thread" option:
> * rebuilding older versions of qemu without "--enable-io-thread" causes
> the bug (guest cannot open raw partition)
> * qemu-kvm-0.12.3 cannot be built with "--enable-io-thread" over here:
>   LINK  x86_64-softmmu/qemu-system-x86_64
> kvm-all.o: In function `qemu_mutex_lock_iothread':
> /usr/src/KVM/qemu-kvm-0.12.3/qemu-kvm.c:2532: multiple definition of
> `qemu_mutex_lock_iothread'
> vl.o:/usr/src/KVM/qemu-kvm-0.12.3/vl.c:3772: first defined here
> [..]
> Which I have reported as part of another unsolved issue here:
> http://www.mail-archive.com/kvm@vger.kernel.org/msg27663.html
> 
> Why not using the io-thread would prevent qemu from opening the raw
> partition is beyond me.

Ok, this is in fact different problem, not the one I referred you
initially (which was in fact good too, because apparently Christoph
solved that bug for me and for other Debian users, thank you!).

In your case, recalling your initial email:

> With qemu-kvm-0.12.3:
> ./qemu-system-x86_64 [..] -drive file=/dev/sdc9,if=virtio,cache=none [..]
> [    1.882843]  vdc:
> [    2.365154] udev: starting version 146
> [    2.693768] end_request: I/O error, dev vdc, sector 126
> [    2.693772] Buffer I/O error on device vdc, logical block 126
> [    2.693775] Buffer I/O error on device vdc, logical block 127
> [    2.693777] Buffer I/O error on device vdc, logical block 128
...

the problem happens right at startup, it can't read _anything_
at all from the disk.  In my case, the problem is intermittent
and happens under high load only, hence the big difference.

But anyway, this is something which should be easy to find
out.  Run kvm under `strace -f' and see how it opens the
device, or find out with lsof what filedescriptor corresponds
to the file in question (in running kvm instance) and see
flags in /proc/$kvm_pid/fdinfo/$fdnum.

I guess it can't open the image in read-write mode somehow.

By the way, iothread doesn't really work in kvm, as far
as I can see.

Thanks.

/mjt

  reply	other threads:[~2010-03-07 15:15 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-06 20:48 raw disks no longer work in latest kvm (kvm-88 was fine) Antoine Martin
2010-03-06 21:28 ` Michael Tokarev
2010-03-07  4:14   ` Antoine Martin
2010-03-07  9:32     ` Michael Tokarev
2010-03-07 10:00       ` Christoph Hellwig
2010-03-07 13:12         ` Antoine Martin
2010-03-07 13:52           ` Antoine Martin
2010-03-07 15:15             ` Michael Tokarev [this message]
2010-03-07 17:11               ` Antoine Martin
2010-03-07 17:18                 ` Avi Kivity
2010-03-07 17:21                   ` Christoph Hellwig
2010-03-07 17:30                     ` Avi Kivity
2010-03-07 17:34                       ` Christoph Hellwig
2010-03-07 18:43                         ` raw disks no longer work in latest kvm (kvm-88 was fine) [SOLVED] Antoine Martin
2010-03-07 18:55                           ` Avi Kivity
2010-03-07 18:01                       ` raw disks no longer work in latest kvm (kvm-88 was fine) Antoine Martin
2010-03-07 18:47                         ` Avi Kivity
2010-03-07 19:07                           ` Antoine Martin
2010-03-07 19:10                             ` Avi Kivity
2010-03-07 19:13                               ` Antoine Martin
2010-03-07 19:17                                 ` Avi Kivity
2010-03-07 19:25                                   ` Antoine Martin
2010-03-07 19:35                                     ` Avi Kivity
2010-03-13  9:51                                       ` Antoine Martin
2010-03-14  7:34                                         ` Avi Kivity
2010-04-08 22:00                                         ` Antoine Martin
2010-05-22 10:44                                           ` Antoine Martin
2010-05-22 11:17                                             ` Michael Tokarev
2010-05-22 11:35                                               ` Antoine Martin
2010-05-23  8:53                                                 ` Antoine Martin
2010-05-23 11:57                                                   ` Avi Kivity
2010-05-23 14:07                                                     ` Antoine Martin
2010-05-23 14:18                                                       ` Avi Kivity
2010-05-23 14:43                                                         ` Antoine Martin
2010-05-23 14:53                                                           ` Antoine Martin
2010-05-23 14:56                                                             ` Avi Kivity
2010-05-23 15:06                                                           ` Antoine Martin
2010-05-23 15:12                                                           ` Avi Kivity
2010-05-23 16:18                                                             ` Antoine Martin
2010-05-23 17:47                                                               ` Stefan Hajnoczi
2010-05-29  9:42                                                                 ` Antoine Martin
2010-05-29  9:55                                                                   ` Stefan Hajnoczi
2010-05-29 10:34                                                                     ` Christoph Hellwig
2010-05-29 11:06                                                                       ` Stefan Hajnoczi
2010-05-29 10:34                                                                   ` Christoph Hellwig
2010-03-07 19:09                           ` Asdo
2010-03-07 19:11                             ` Antoine Martin
2010-03-07 19:12                             ` Avi Kivity
2010-03-07 16:21         ` Avi Kivity
2010-03-08 16:45           ` Anthony Liguori
2010-03-07  9:36 ` Gleb Natapov

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=4B93C2F9.7030904@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=antoine@nagafix.co.uk \
    --cc=hch@infradead.org \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.