qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Important] Query regarding bdrv_co_discard


From: Sanjay Kumar2
Subject: Re: [Qemu-devel] [Important] Query regarding bdrv_co_discard
Date: Thu, 11 Sep 2014 01:53:49 -0700

Hi Stefan,

Sorry for delay in response as I was sick. Actually I have below two very 
important queries. Answer to both queries are valuable to me. We are planning 
to add block driver with the new protocol after proper testing.

1.  With my new network based disk protocol, if I use 'raw' format, then it is 
working perfectly. But, when I am using 'qcow2' format, then is it causing 
issue. After debugging I found that it is returning because bdrv_get_geometry() 
is returning 0 in case of format='qcow2'. Below is the qemu args for the same. 
Please let me know what I am missing here.

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none 
/usr/libexec/qemu-kvm -name centos-6.5-vm1 -S -M rhel6.5.0 -enable-kvm -m 2048 
-realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 
daec3cd9-d8b1-f01c-ba84-352da7f691f1 -nodefconfig -nodefaults -chardev 
socket,id=charmonitor,path=/var/lib/libvirt/qemu/centos-6.5-vm1.monitor,server,nowait
 -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown 
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive 
file=/tmp/centos-6.5.qcow2-vm1,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native
 -device 
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
 -drive 
file=oflame://192.168.122.77:5678/openflame/vDisk001,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native
 -device 
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1
 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device 
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev 
tap,fd=24,id=hostnet0,vhost=on,vhostfd=25 -device 
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:0f:f4:34,bus=pci.0,addr=0x3 
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 
-device usb-tablet,id=input0 -vnc 0.0.0.0:0 -vga cirrus -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

2. The qemu-kvm is starting with below arguments with virtio-scsi. I am not 
able to see the TRIM in hdparm output of the device. Also, this is working with 
raw format only, not with qcow2 format.

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none 
/usr/libexec/qemu-kvm -name centos-6.5-vm1 -S -M rhel6.5.0 -enable-kvm -m 2048 
-realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 
daec3cd9-d8b1-f01c-ba84-352da7f691f1 -nodefconfig -nodefaults -chardev 
socket,id=charmonitor,path=/var/lib/libvirt/qemu/centos-6.5-vm1.monitor,server,nowait
 -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown 
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device 
virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x6 -device 
virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x7 -drive 
file=/tmp/centos-6.5.qcow2-vm1,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native
 -device 
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
 -drive 
file=oflame://10.209.133.163:5678/openflame/vDisk001,if=none,id=drive-scsi1-0-0-0,format=raw,cache=none,aio=native
 -device 
scsi-hd,bus=scsi1.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi1-0-0-0,id=scsi1-0-0-0
 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device 
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev 
tap,fd=24,id=hostnet0,vhost=on,vhostfd=25 -device 
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:0f:f4:34,bus=pci.0,addr=0x3 
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 
-device usb-tablet,id=input0 -vnc 0.0.0.0:0 -vga cirrus -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5


Many Thanks in advance.

With best regards,
Sanjay Kumar

-----Original Message-----
From: Stefan Hajnoczi [mailto:address@hidden 
Sent: Thursday, September 04, 2014 7:29 PM
To: Sanjay Kumar2
Cc: 'address@hidden'
Subject: Re: [Qemu-devel] [Important] Query regarding bdrv_co_discard

On Thu, Sep 04, 2014 at 05:56:53AM -0700, Sanjay Kumar2 wrote:
> Output of hdparam is below. Also let me know does network based protocol 
> supports 'qcow2' format. As my block driver is network based. It is perfectly 
> working for raw format. When I change the type='qcow2', then it is not 
> working because bdrv_get_geometry() is returning 0. This I am talking about 
> qemu-kvm-0.12.1.2.
> 
> address@hidden ~]# hdparm -I /dev/sda
> 
> /dev/sda:
> SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 
> 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> ATA device, with non-removable media
> Standards:
>         Likely used: 1
> Configuration:
>         Logical         max     current
>         cylinders       0       0
>         heads           0       0
>         sectors/track   0       0
>         --
>         Logical/Physical Sector size:           512 bytes
>         device size with M = 1024*1024:           0 MBytes
>         device size with M = 1000*1000:           0 MBytes
>         cache/buffer size  = unknown

I guess you are asking why hdparm reports 0 MB size?

Please post the qemu command-line (ps aux | grep qemu) so we know how the guest 
is configured.

qcow2 works on non-file protocols (e.g. network).

Please keep discussion in this email thread and don't post comments about this 
on my blog.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]