qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] qed: Add QEMU Enhanced Disk format


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [RFC] qed: Add QEMU Enhanced Disk format
Date: Fri, 10 Sep 2010 15:47:01 +0200
User-agent: Mutt/1.3.28i

On Fri, Sep 10, 2010 at 12:33:09PM +0100, Stefan Hajnoczi wrote:
> > btw, despite being not properly designed, qcow2 is able to support TRIM.
> > ?qed isn't able to, except by leaking clusters on shutdown. ?TRIM support is
> > required unless you're okay with the image growing until it is no longer
> > sparse (the lack of TRIM support in guests make sparse image formats
> > somewhat of a joke, but nobody seems to notice).
> 
> Anthony has started writing up notes on trim for qed:
> http://wiki.qemu.org/Features/QED/Trim
> 
> I need to look at the actual ATA and SCSI specs for how this will
> work.  The issue I am concerned with is sub-cluster trim operations.
> If the trim region is less than a cluster, then both qed and qcow2
> don't really have a way to handle it.  Perhaps we could punch a hole
> in the file, given a userspace interface to do this, but that isn't
> ideal because we're losing sparseness again.

ATA TRIM doesn't have a granularity, it's always sector sized.  SCSI
WRITE SAME with the unmap bit or UNMAP as well as my virtio_blk support
for discarding blocks export topoligy information about the required
minimum discard request size.  I export it from qemu the same way as
we export other topology information and at least Linux hosts can use
it.

Note that ATA allows simply ignoring TRIM requests that we can't handle,
and if we don't set the bit that guarantees TRIMed regions to be zeroed
we don't even have to zero out the regions.



reply via email to

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