* [Qemu-devel] Using the ATA "trim" command to discard sectors in disk images
@ 2009-03-24 6:14 Marc Bevand
0 siblings, 0 replies; only message in thread
From: Marc Bevand @ 2009-03-24 6:14 UTC (permalink / raw)
To: qemu-devel
The ATA command "trim", recently standardized by the T13 committee, has been
designed to allow SSDs to do better wear-leveling. But there is an obvious fit
for it in virtualizers such as Qemu: guests issuing trim commands would allow
the host to deallocate block sectors in disk images.
In fact the trim command is already used by very recent Linux kernels: it is
exported to the kernel via the block layer blkdev_issue_discard() call, and
to userspace via the BLKDISCARD ioctl:
http://lwn.net/Articles/293658/
Swap allocation just started making use of it 2.6.29:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7992fde72ce06c73280a1939b7a1e903bc95ef85
I just wanted to raise awareness of that command. I hope sometime
in the future we will see qcow files able to decrease in size when files
are deleted in guests :-)
-marc
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-24 6:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 6:14 [Qemu-devel] Using the ATA "trim" command to discard sectors in disk images Marc Bevand
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).