qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Query regarding bdrv_co_discard


From: Sanjay Kumar2
Subject: Re: [Qemu-devel] Query regarding bdrv_co_discard
Date: Wed, 3 Sep 2014 03:40:48 -0700

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:address@hidden 
Sent: Wednesday, September 03, 2014 4:06 PM
To: Sanjay Kumar2
Cc: address@hidden
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



reply via email to

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