« Previous | Next » 

Revision ef72f76e

IDef72f76e58107bd4096018c3db2912d28249308e

Added by Stefan Hajnoczi over 11 years ago

qed: refuse unaligned zero writes with a backing file

Zero writes have cluster granularity in QED. Therefore they can only be
used to zero entire clusters.

If the zero write request leaves sectors untouched, zeroing the entire
cluster would obscure the backing file. Instead return -ENOTSUP, which
is handled by block.c:bdrv_co_do_write_zeroes() and falls back to a
regular write.

The qemu-iotests 034 test cases covers this scenario.

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences