qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/18] Support mismatched host and guest logical block sizes
@ 2012-01-26 17:22 Paolo Bonzini
  2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 01/18] block: do not rely on open_flags for bdrv_is_snapshot Paolo Bonzini
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: Paolo Bonzini @ 2012-01-26 17:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

As in v1, the series is logically split in two parts.

The first six patches ensure that BDRV_O_NO_CACHE is set for all non-file
protocols.  This makes sure that large sectors are handled correctly
for the libiscsi backend.

The next patches add support for arbitrary combinations of host/guest
logical block size even for cache=none.  Having guest_block_size >
host_block_size is unsafe in the presence of power failures, while
having guest_block_size < host_block_size is just (possibly) slower.

Physical block size and minimum I/O size are set to the host block
size in order to minimize ill performance behavior.  This is a small
guest-visible change, but only if you were hosting your images on a
4k-sector partition _and_ using cache != none:

- 4k-sectors and cache=none used to fail horribly

- filesystem images with cache != none cannot detect they are on a
  4k-sector disk, because BLKSSZGET fails

This should be rare enough that it's bearable to trade this for better
defaults.

v1->v2: new patch to set min_io_size and please XFS;
    aesthetic changes to patches 2 and 3 suggested by Zhi;
    rebase around copy-on-read changes.

Paolo Bonzini (18):
  block: do not rely on open_flags for bdrv_is_snapshot
  block: store actual flags in bs->open_flags
  block: pass protocol flags up to the format
  block: non-raw protocols never cache
  block: remove enable_write_cache
  block: move flag bits together
  raw: remove the aligned_buf
  block: rename buffer_alignment to guest_block_size
  block: add host_block_size
  raw: probe host_block_size
  iscsi: save host block size
  block: allow waiting only for overlapping writes
  block: allow waiting at arbitrary granularity
  block: protect against "torn reads" for guest_block_size > host_block_size
  block: align and serialize I/O when guest_block_size < host_block_size
  block: default physical block size to host block size
  qemu-io: add blocksize argument to open
  block: default min_io_size to host block size when doing rmw

 Makefile.objs     |    4 +-
 block.c           |  336 ++++++++++++++++++++++++++++++++++++++++++++++-------
 block.h           |   18 +---
 block/curl.c      |    1 +
 block/iscsi.c     |    3 +
 block/nbd.c       |    1 +
 block/raw-posix.c |   97 +++++++++------
 block/raw-win32.c |   42 +++++++
 block/rbd.c       |    1 +
 block/sheepdog.c  |    1 +
 block/vdi.c       |    1 +
 block_int.h       |   25 ++--
 hw/ide/core.c     |    2 +-
 hw/scsi-disk.c    |    4 +-
 hw/scsi-generic.c |    2 +-
 hw/virtio-blk.c   |    4 +-
 qemu-io.c         |   33 +++++-
 trace-events      |    1 +
 18 files changed, 452 insertions(+), 124 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-01-26 17:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 17:22 [Qemu-devel] [PATCH v2 00/18] Support mismatched host and guest logical block sizes Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 01/18] block: do not rely on open_flags for bdrv_is_snapshot Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 02/18] block: store actual flags in bs->open_flags Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 03/18] block: pass protocol flags up to the format Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 04/18] block: non-raw protocols never cache Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 05/18] block: remove enable_write_cache Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 06/18] block: move flag bits together Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 07/18] raw: remove the aligned_buf Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 08/18] block: rename buffer_alignment to guest_block_size Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 09/18] block: add host_block_size Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 10/18] raw: probe host_block_size Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 11/18] iscsi: save host block size Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 12/18] block: allow waiting only for overlapping writes Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 13/18] block: allow waiting at arbitrary granularity Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 14/18] block: protect against "torn reads" for guest_block_size > host_block_size Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 15/18] block: align and serialize I/O when guest_block_size < host_block_size Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 16/18] block: default physical block size to host block size Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 17/18] block: default min_io_size to host block size when doing rmw Paolo Bonzini
2012-01-26 17:22 ` [Qemu-devel] [PATCH v2 18/18] qemu-io: add blocksize argument to open Paolo Bonzini

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).