[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] block: add discard support
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] block: add discard support |
Date: |
Mon, 13 Dec 2010 16:43:57 +0100 |
User-agent: |
Mutt/1.3.28i |
On Sat, Dec 11, 2010 at 12:50:20PM +0000, Paul Brook wrote:
> > It's guest visible state, so it must not change due to migrations. For
> > the current implementation all values for it work anyway - if it's
> > smaller than the block size we'll zero out the remainder of the block.
>
> That sounds wrong. Surely we should leave partial blocks untouched.
While zeroing them is not required for qemu, the general semantics of
the XFS ioctl require it. It punches a hole, which means it's makes the
new area equivalent to a hole create by truncating a file to a larger
size and then only writing at the larger offset. The semantics for a
hole in all Unix filesystems is that we read back zeroes from them.
If we write into a sparse file at a not block aligned offset the
zeroing of the partial block also happens.
[Qemu-devel] [PATCH 2/5] scsi-disk: support WRITE SAME (16) with unmap bit, Christoph Hellwig, 2010/12/01
[Qemu-devel] [PATCH 3/5] make dma_bdrv_io available to drivers, Christoph Hellwig, 2010/12/01
[Qemu-devel] [PATCH 4/5] ide: add TRIM support, Christoph Hellwig, 2010/12/01
[Qemu-devel] [PATCH 5/5] raw-posix: add discard support, Christoph Hellwig, 2010/12/01