Re: [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command

2012-06-22 Thread Chris Wedgwood
> I'm not sure I understand, wouldn't the filesystem need to be involved > at some level? How can the block layer differentiate lazilly discarded data > blocks from ones that are still in use without the aid of the > filesystem? It might be me that doesn't understand. Yes, the filesystem is invol

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command

2012-06-22 Thread Chris Wedgwood
> FITRIM is a mounted filesystem feature to discard (or "trim") blocks which > are not in use by the filesystem. This is useful for solid-state drives > (SSDs) and thinly-provisioned storage. Provide access to the feature > from the host so that filesystems can be trimmed periodically or before >

Re: [Qemu-devel] [RFC PATCH 14/17] block: support FALLOC_FL_PUNCH_HOLE trimming

2012-03-09 Thread Chris Wedgwood
> SEEK_HOLE could provide a very simple heuristic to detect preallocated > files (unfortunately ext4 does not implement SEEK_HOLE yet). SEEK_HOLE is a weird (confusing and no intuitive) API (IMO). There is FIEMAP or whatever it's called which seems somewhat saner. XFS specific there is also GETB

Re: [Qemu-devel] [RFC PATCH 14/17] block: support FALLOC_FL_PUNCH_HOLE trimming

2012-03-09 Thread Chris Wedgwood
> This will enable discard on more filesystems, including ext4. i think this should default to off for preallocated files this will punch holes all over the place and reallocation will cause fragmentation (guests will free and reallocat blocks normally) xfs has a mechanism to convert to unwritt

Re: [Qemu-devel] [PATCH] ide.c make write cacheing controllable by guest

2008-02-25 Thread Chris Wedgwood
On Mon, Feb 25, 2008 at 08:50:40PM +, Jamie Lokier wrote: > On Linux (and other host OSes), fdatsync() and fsync() don't always > commit data to hard storage; it sometimes only commits it to the hard > drive cache. That's a filesystem bug IMO. People should be able to use f[data]sync with so