From: Peter Lieven <pl@kamp.de>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, ronniesahlberg@gmail.com,
Peter Lieven <pl@kamp.de>,
stefanha@redhat.com, anthony@codemonkey.ws, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCHv4 00/17] block: logical block provisioning enhancements
Date: Tue, 8 Oct 2013 13:57:54 +0200 [thread overview]
Message-ID: <1381233491-17019-1-git-send-email-pl@kamp.de> (raw)
this patch adds the ability for targets to stay sparse during
block migration (if the zero_blocks capability is set) and qemu-img convert
even if the target does not have has_zero_init = 1.
the series was especially developed for iSCSI, but it should also work
with other drivers with little or no adjustments. these adjustments
should be limited to providing block provisioning information through
get_block_info and/or honouring BDRV_REQ_MAY_UNMAP on writing zeroes.
v3->v4:
- changed BlockLimits struct to typedef (Stefan, Eric)
- renamed bdrv_zeroize to bdrv_make_zero (Stefan)
- added comment about the -S flag of qemu-img convert in
qemu-img.texi (Eric)
- used struct assignment for bs->bl in raw_open (Stefan, Eric)
- dropped 3 get_block_status fixes that are independent of
this series and already partly merged.
v2->v3:
- fix merge conflict in block/qcow2_cluster.c
- changed return type of bdrv_has_discard_zeroes and
bdrv_has_discard_write_zeroes to bool.
- moved alignment and limits info to a BlockLimits struct (Paolo).
- added magic constanst for default maximum in bdrv_co_do_write_zeroes
and bdrv_co_discard (Eric).
- bdrv_co_do_write_zeroes: allocating the bounce buffer only once (Eric),
fixed bounce iov_len in the fall back path.
- bdrv_zeroize: added inline docu (Eric) and do not mask flags passed
to bdrv_write_zeroes (Eric).
- qemu-img: changed the default hint for -S (min_sparse) in the usage
help to 4k. not changing the default as it is unclear why this default
was set. size suffixes are already supported (Eric).
v1->v2:
- moved block max_discard and max_write_zeroes to BlockDriverState
- added discard_alignment and write_zeroes_alignment to BlockDriverState
- added bdrv_has_discard_zeroes() and bdrv_has_discard_write_zeroes()
- added logic to bdrv_co_discard and bdrv_co_do_write_zeroes to honour
limit and alignment info.
- added support for -S 0 in qemu-img convert.
Peter Lieven (17):
block: make BdrvRequestFlags public
block: add flags to bdrv_*_write_zeroes
block: introduce BDRV_REQ_MAY_UNMAP request flag
block: introduce bdrv_has_discard_zeroes and
bdrv_has_discard_write_zeroes
block/raw: add bdrv_has_discard_zeroes and
bdrv_has_discard_write_zeroes
block: add BlockLimits structure to BlockDriverState
block: honour BlockLimits in bdrv_co_do_write_zeroes
block: honour BlockLimits in bdrv_co_discard
iscsi: simplify iscsi_co_discard
iscsi: set limits in BlockDriverState
iscsi: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes
iscsi: add bdrv_co_write_zeroes
block: introduce bdrv_make_zero
block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks
qemu-img: add support for fully allocated images
qemu-img: conditionally zero out target on convert
block/raw: copy BlockLimits on raw_open
block-migration.c | 3 +-
block.c | 199 +++++++++++++++++++++++++++++++++++++--------
block/backup.c | 3 +-
block/iscsi.c | 152 ++++++++++++++++++++++++----------
block/qcow2-cluster.c | 2 +-
block/qcow2.c | 2 +-
block/qed.c | 3 +-
block/raw_bsd.c | 62 ++++++++------
block/vmdk.c | 3 +-
include/block/block.h | 19 ++++-
include/block/block_int.h | 32 +++++++-
qemu-img.c | 18 +++-
qemu-img.texi | 5 ++
qemu-io-cmds.c | 2 +-
14 files changed, 394 insertions(+), 111 deletions(-)
--
1.7.9.5
next reply other threads:[~2013-10-08 11:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 11:57 Peter Lieven [this message]
2013-10-08 11:57 ` [Qemu-devel] [PATCHv4 01/17] block: make BdrvRequestFlags public Peter Lieven
2013-10-08 11:57 ` [Qemu-devel] [PATCHv4 02/17] block: add flags to bdrv_*_write_zeroes Peter Lieven
2013-10-08 11:57 ` [Qemu-devel] [PATCHv4 03/17] block: introduce BDRV_REQ_MAY_UNMAP request flag Peter Lieven
2013-10-08 11:57 ` [Qemu-devel] [PATCHv4 04/17] block: introduce bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes Peter Lieven
2013-10-08 11:57 ` [Qemu-devel] [PATCHv4 05/17] block/raw: add " Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 06/17] block: add BlockLimits structure to BlockDriverState Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 07/17] block: honour BlockLimits in bdrv_co_do_write_zeroes Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 08/17] block: honour BlockLimits in bdrv_co_discard Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 09/17] iscsi: simplify iscsi_co_discard Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 10/17] iscsi: set limits in BlockDriverState Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 11/17] iscsi: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 12/17] iscsi: add bdrv_co_write_zeroes Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 13/17] block: introduce bdrv_make_zero Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks Peter Lieven
2013-10-18 12:38 ` Stefan Hajnoczi
2013-10-18 12:49 ` Paolo Bonzini
2013-10-18 13:24 ` Stefan Hajnoczi
2013-10-18 13:52 ` Peter Lieven
2013-10-18 13:58 ` Paolo Bonzini
2013-10-18 13:26 ` Peter Lieven
2013-10-18 13:50 ` Paolo Bonzini
2013-10-18 19:10 ` Peter Lieven
2013-10-30 8:28 ` Stefan Hajnoczi
2013-10-30 21:22 ` Peter Lieven
2013-10-18 13:20 ` Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 15/17] qemu-img: add support for fully allocated images Peter Lieven
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 16/17] qemu-img: conditionally zero out target on convert Peter Lieven
2013-10-18 12:26 ` Stefan Hajnoczi
2013-10-08 11:58 ` [Qemu-devel] [PATCHv4 17/17] block/raw: copy BlockLimits on raw_open Peter Lieven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381233491-17019-1-git-send-email-pl@kamp.de \
--to=pl@kamp.de \
--cc=anthony@codemonkey.ws \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).