* [Qemu-devel] Query regarding bdrv_co_discard
@ 2014-09-02 9:09 Sanjay Kumar2
2014-09-03 10:35 ` Stefan Hajnoczi
0 siblings, 1 reply; 3+ messages in thread
From: Sanjay Kumar2 @ 2014-09-02 9:09 UTC (permalink / raw)
To: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
Hi,
Please let me know how to test bdrv_co_discard interface. I mean what steps I need to do on KVM host and inside guest to do end to end testing of this interface. I have implemented a network protocol based block driver and defined bdrv_co_discard interface as well which free the blocks on the remote storage device.
Thanks and Best Regards,
Sanjay Kumar
[-- Attachment #2: Type: text/html, Size: 2074 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Query regarding bdrv_co_discard
2014-09-02 9:09 [Qemu-devel] Query regarding bdrv_co_discard Sanjay Kumar2
@ 2014-09-03 10:35 ` Stefan Hajnoczi
2014-09-03 10:40 ` Sanjay Kumar2
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2014-09-03 10:35 UTC (permalink / raw)
To: Sanjay Kumar2; +Cc: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 583 bytes --]
On Tue, Sep 02, 2014 at 02:09:44AM -0700, Sanjay Kumar2 wrote:
> Please let me know how to test bdrv_co_discard interface. I mean what steps I need to do on KVM host and inside guest to do end to end testing of this interface. I have implemented a network protocol based block driver and defined bdrv_co_discard interface as well which free the blocks on the remote storage device.
Use a virtio-scsi storage controller and then the guest can send SCSI
discard commands. Make sure to use the -drive ...,discard=unmap option,
otherwise discard commands are silently ignored.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Query regarding bdrv_co_discard
2014-09-03 10:35 ` Stefan Hajnoczi
@ 2014-09-03 10:40 ` Sanjay Kumar2
0 siblings, 0 replies; 3+ messages in thread
From: Sanjay Kumar2 @ 2014-09-03 10:40 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel@nongnu.org
Thanks Stefan.
I using the same. Below is the XML.
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
<source protocol='oflame' name='/dev/of/vdisk/{a30c3997-0ad8-4495-8549-68431abfa84a}'>
<host name='10.209.133.163' port='9999'/>
</source>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='1' bus='0' target='0' unit='0'/>
</disk>
....
<controller type='scsi' index='1' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</controller>
I am able to see the scsi disk, /dev/sda inside the guest, but does not showing TRIM supported in the hdparm output. Fstrim command is also failing.
Regards,
Sanjay
-----Original Message-----
From: Stefan Hajnoczi [mailto:stefanha@gmail.com]
Sent: Wednesday, September 03, 2014 4:06 PM
To: Sanjay Kumar2
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Query regarding bdrv_co_discard
On Tue, Sep 02, 2014 at 02:09:44AM -0700, Sanjay Kumar2 wrote:
> Please let me know how to test bdrv_co_discard interface. I mean what steps I need to do on KVM host and inside guest to do end to end testing of this interface. I have implemented a network protocol based block driver and defined bdrv_co_discard interface as well which free the blocks on the remote storage device.
Use a virtio-scsi storage controller and then the guest can send SCSI discard commands. Make sure to use the -drive ...,discard=unmap option, otherwise discard commands are silently ignored.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-03 10:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02 9:09 [Qemu-devel] Query regarding bdrv_co_discard Sanjay Kumar2
2014-09-03 10:35 ` Stefan Hajnoczi
2014-09-03 10:40 ` Sanjay Kumar2
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).