With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
---
block/file-posix.c | 96 +++--
include/block/raw-aio.h | 10 --
2 files changed, 101 insertions(+), 5
The device designator data returned in INQUIRY command will be useful to
fill in source/target fields during copy offloading. Do this when
connecting to the target and save the data for later use.
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
---
block/iscsi.c| 41
The new blk_co_copy_range interface offers a more efficient way in the
case of network based storage. Make use of it to allow faster convert
operation.
Since copy offloading cannot do zero detection ('-S') and compression
(-c), only try it when these options are not used.
Signed-off-by: Fam
So there is no
visible behavior change in adding the check code.
The int64_t -> uint64_t inconsistency, as shown by the type casting, is
pre-existing due to the interface.
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
Signed-off-by: Fam Zheng
---
block/raw-format.
igned-off-by: Fam Zheng
---
block/qcow2.c | 229 ++
1 file changed, 199 insertions(+), 30 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 6d532470a8..8f89c4fe72 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1762,6 +1762,39
This loop is repeated a growing number times. Make a helper.
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Eric Blake
---
block/iscsi.c | 54 +-
1 file changed, 17 insertions(+), 37 deletions(-)
diff --git a/block
It's a BlockBackend wrapper of the BDS interface.
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
---
block/block-backend.c | 18 ++
include/sysemu/block-backend.h | 4
2 files changed, 22 insertions(+)
diff --git a/block/block-backend.c b/block/block
Just pass down to ->file.
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
---
block/raw-format.c | 32
1 file changed, 32 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
index b69a0674b3..f2e468df6f 100644
--- a/block/raw-forma
-img convert, we can emulate
offloading in scsi-disk (handle EXTENDED COPY command), and use the API in
block jobs too.
Fam Zheng (10):
block: Introduce API for copy offloading
raw: Check byte range uniformly
raw: Implement copy offloading
qcow2: Implement copy offloading
file-posix
copy_file_range(2).
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
---
block/io.c| 97 +++
include/block/block.h | 32
include/block/block_int.h | 38 +++
3 files changed, 167 insertions
On Mon, 05/28 11:36, Fam Zheng wrote:
> The two callbacks are implemented quite similarly to the read/write
> functions: bdrv_co_copy_range_from maps for read and calls into bs->file
> or bs->backing depending on the allocation status; bdrv_co_copy_range_to
> maps for write and c
an8.docker
> b/tests/docker/dockerfiles/debian8.docker
> index 1bcf2e3d2f..52945631cd 100644
> --- a/tests/docker/dockerfiles/debian8.docker
> +++ b/tests/docker/dockerfiles/debian8.docker
> @@ -32,6 +32,3 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
> pkg-config \
> python-minimal
>
> -# Setup Emdebian [emdebian-archive-keyring]
> -RUN echo "deb http://emdebian.org/tools/debian/ jessie main" >
> /etc/apt/sources.list.d/emdebian.list && \
> -curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key |
> apt-key add -
> --
> 2.17.0
>
Nice clean up!
Reviewed-by: Fam Zheng <f...@redhat.com>
Issue EXTENDED COPY (LID1) command to implement the copy_range API.
The parameter data construction code is modified from libiscsi's
iscsi-dd.c.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/iscsi.c
It's a BlockBackend wrapper of the BDS interface.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/block-backend.c | 18 ++
include/sysemu/block-backend.h | 4
2 files changed, 22 insertions(+)
zi <stefa...@redhat.com>
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/qcow2.c | 226 ++
1 file changed, 196 insertions(+), 30 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 6d532470a8..e32a3c1518 100644
--- a/bloc
The new blk_co_copy_range interface offers a more efficient way in the
case of network based storage. Make use of it to allow faster convert
operation.
Since copy offloading cannot do zero detection ('-S') and compression
(-c), only try it when these options are not used.
Signed-off-by: Fam
This loop is repeated a growing number times. Make a helper.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
---
block/iscsi.c | 54 +-
So there is no
visible behavior change in adding the check code.
The int64_t -> uint64_t inconsistency, as shown by the type casting, is
pre-existing due to the interface.
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
Signed-off-by: Fam Zhen
Just pass down to ->file.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/raw-format.c | 32
1 file changed, 32 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
i
The device designator data returned in INQUIRY command will be useful to
fill in source/target fields during copy offloading. Do this when
connecting to the target and save the data for later use.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@r
With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/file-posix.c | 96 +++--
include/block/raw-aio.h |
can emulate
offloading in scsi-disk (handle EXTENDED COPY command), and use the API in
block jobs too.
Fam Zheng (10):
block: Introduce API for copy offloading
raw: Check byte range uniformly
raw: Implement copy offloading
qcow2: Implement copy offloading
file-posix: Implement
copy_file_range(2).
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/io.c| 97 +++
include/block/block.h | 32
include/block/bloc
On Fri, 05/25 07:47, Markus Armbruster wrote:
> Fam Zheng <f...@redhat.com> writes:
>
> > On Thu, 05/24 19:16, Paolo Bonzini wrote:
> >> On 21/05/2018 08:35, Fam Zheng wrote:
> >> > Coverity doesn't like the tests under fail label (report CID 1385847).
On Thu, 05/24 20:58, Cleber Rosa wrote:
> TL;DR
> =
>
> Another version, with a minimalist approach, to the acceptance tests
> infrastructure for QEMU, based on the Avocado Testing Framework.
>
> Background
> ==
>
> The previous version, still considered an RFC, was sent to the list
On Thu, 05/24 20:58, Cleber Rosa wrote:
> The set_console() method is intended to ease higher level use cases
> that require a console device.
>
> The amount of inteligence is limited on purpose, requiring either the
> device type explicitly, or the existence of a machine (pattern)
> definition.
On Thu, 05/24 20:58, Cleber Rosa wrote:
> This patch adds a few simple behavior tests for VNC. These tests
> introduce manipulation of the QEMUMachine arguments, by setting
> the arguments, instead of adding to the existing ones.
I'm confused by this. The code uses 'add_args', so it does add to
On Thu, 05/24 20:58, Cleber Rosa wrote:
> This patch adds the very minimum infrastructure necessary for writing
> and running functional/acceptance tests, including:
>
> * Documentation
> * The avocado_qemu.Test base test class
> * One example tests (test_version.py)
>
> Additional
On Thu, 05/24 19:16, Paolo Bonzini wrote:
> On 21/05/2018 08:35, Fam Zheng wrote:
> > Coverity doesn't like the tests under fail label (report CID 1385847).
> > Reset the fields so the clean up order is more apparent.
> >
> > Signed-off-by: Fam Zheng <f...@redhat.
On Wed, 05/23 13:28, Eric Blake wrote:
> On 05/22/2018 10:04 PM, Fam Zheng wrote:
> > We don't verify the request range against s->size in the I/O callbacks
> > except for raw_co_pwritev. This is wrong (especially for
> > raw_co_pwrite_zeroes and raw_co_pdiscard), so
On Mon, 05/21 16:58, Fam Zheng wrote:
> Coverity doesn't like the tests under fail label (report CID 1385847).
> Reset the fields so the clean up order is more apparent.
>
> Signed-off-by: Fam Zheng <f...@redhat.com>
Queued, thanks.
Fam
On Mon, 05/21 11:35, Alex Bennée wrote:
> If the user doesn't specify a TARGET_LIST they get the current
> configuration but with spaces and hilarity ensues. This adds some make
> magic to turn the TARGET_LIST back into a comma separated list.
>
> Signed-off-by: Alex Bennée
It's a BlockBackend wrapper of the BDS interface.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/block-backend.c | 18 ++
include/sysemu/block-backend.h | 4
2 files changed, 22 insertions(+)
The new blk_co_copy_range interface offers a more efficient way in the
case of network based storage. Make use of it to allow faster convert
operation.
Since copy offloading cannot do zero detection ('-S') and compression
(-c), only try it when these options are not used.
Signed-off-by: Fam
Issue EXTENDED COPY (LID1) command to implement the copy_range API.
The parameter data construction code is modified from libiscsi's
iscsi-dd.c.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/iscsi.c
This loop is repeated a growing number times. Make a helper.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
---
block/iscsi.c | 54 +-
The two callbacks are implemented quite similarly to the read/write
functions: bdrv_co_copy_range_from maps for read and calls into bs->file
or bs->backing depending on the allocation status; bdrv_co_copy_range_to
maps for write and calls into bs->file.
Signed-off-by: Fam Zheng <f..
The device designator data returned in INQUIRY command will be useful to
fill in source/target fields during copy offloading. Do this when
connecting to the target and save the data for later use.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@r
With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/file-posix.c | 96 +++--
include/block/raw-aio.h |
We don't verify the request range against s->size in the I/O callbacks
except for raw_co_pwritev. This is wrong (especially for
raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/raw-form
the API in
block jobs too.
Fam Zheng (10):
block: Introduce API for copy offloading
raw: Check byte range uniformly
raw: Implement copy offloading
qcow2: Implement copy offloading
file-posix: Implement bdrv_co_copy_range
iscsi: Query and save device designator when opening
iscsi
copy_file_range(2).
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/io.c| 97 +++
include/block/block.h | 32
include/block/bloc
Just pass down to ->file.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/raw-format.c | 32
1 file changed, 32 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
i
ST_IMG="ssh://127.0.0.1$TEST_IMG_FILE"
> elif [ "$IMGPROTO" = "nfs" ]; then
> TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
> +REMOTE_TEST_DIR="nfs://127.0.0.1$TEST_DIR"
> TEST_IMG="nfs://127.0.0.1$TEST_IMG_FILE"
>
On Fri, 05/18 16:26, Kevin Wolf wrote:
> The reference output file only works for file. 'qemu-img convert -p'
> makes a lot more progress updates for NFS than for file, so disable the
> test for NFS.
>
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
hat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
On Tue, 05/22 22:10, Paolo Bonzini wrote:
> The expression "SD_INODE_SIZE - sizeof(inode.data_vdi_id)" already has a macro
> defined for the same value (though with a nicer definition using offsetof).
> Replace it.
>
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com
On Tue, 05/22 17:02, Kevin Wolf wrote:
> Am 22.05.2018 um 16:19 hat Michael S. Tsirkin geschrieben:
> > On Tue, May 22, 2018 at 09:35:55AM +0200, Gerd Hoffmann wrote:
> > > Hi,
> > >
> > > > You must /sometimes/ supply the correct machine type.
> > > >
> > > > It is quite dependent on the
On Tue, 05/22 22:10, Paolo Bonzini wrote:
> block/sheepdog.o has a 4M static variable that is 90% of QEMU's whole .bss
> section. Replace it with a heap-allocated block, and make it smaller too
> since only the inode header is actually being used.
>
> bss size goes down from 4464280 to 269976.
>
Coverity doesn't like the tests under fail label (report CID 1385847).
Reset the fields so the clean up order is more apparent.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
v2: Don't play stupid. [Peter]
---
block/nvme.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/nv
On Mon, 05/21 09:35, Peter Maydell wrote:
> On 21 May 2018 at 07:35, Fam Zheng <f...@redhat.com> wrote:
> > Coverity doesn't like the tests under fail label (report CID 1385847).
> > Reset the fields so the clean up order is more apparent.
> >
> > Signed-o
Coverity doesn't like the tests under fail label (report CID 1385847).
Reset the fields so the clean up order is more apparent.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/nvme.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/block/nvme.c b/block/nvme.c
index 6f71
On Fri, 05/18 19:01, Peter Maydell wrote:
> On 1 March 2018 at 07:54, Fam Zheng <f...@redhat.com> wrote:
> > From: Paolo Bonzini <pbonz...@redhat.com>
> >
> > 1) string not null terminated in sysfs_find_group_file
> >
> > 2) NULL pointer der
On Fri, 05/18 16:22, Alex Bennée wrote:
> If the user doesn't specify a TARGET_LIST they get the current
> configuration but with spaces and hilarity ensues. This adds some make
> magic to turn the TARGET_LIST back into a comma separated list.
>
> Signed-off-by: Alex Bennée
On Fri, 05/18 11:34, Alistair Francis wrote:
> Avocado is not trivial to setup on non-Fedora systems. To simplfying
> future testing add a docker test image that runs Avocado tests.
>
> Signed-off-by: Alistair Francis
> ---
> v2:
> - Add a seperate fedora-avocado
;
Message-Id: <1526517763-11108-1-git-send-email-wangji...@huawei.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Peter Xu <pet...@redhat.com>
[Mention change to aio_epoll_disable in commit message. - Fam]
Signed-off-by: Fam Zheng <f...@redhat.com>
---
include/block/a
From: Philippe Mathieu-Daudé <f4...@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
Message-Id: <20180508144358.13530-1-f4...@amsat.org>
Reviewed-by: Laurent Vivier <laur...@vivier.eu>
Signed-off-by: Fam Zheng <f...@redhat.com>
---
tests/docker/M
The following changes since commit a4207e3b00e89f934adb231057dcf9a75ac2ae45:
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into
staging (2018-05-17 11:59:50 +0100)
are available in the Git repository at:
git://github.com/famz/qemu.git
On Fri, 05/18 16:24, WangJie (Pluto) wrote:
> Ping
I'll send a pull request with v5.
Fam
es look good to me:
Acked-by: Fam Zheng <f...@redhat.com>
On Thu, 05/17 10:26, Jie Wang wrote:
> epoll_available will only be set if epollfd != -1, os we
s/os/so/
> can swap the two variables in aio_epoll_disable, and
> aio_context_destroy can call aio_epoll_disable directly.
If you put this as 1/2 in v7, you do not want to mention the
Thanks for the quick iterations. A note on the patch submission:
When sending patch series with git, please use git-send-email's "--thread
--no-chain-reply-to" options, and also create a cover letter using "git
format-patch --cover-letter". Or you can use git-publish. For more complete
> @@ -298,6 +298,7 @@ aio_ctx_finalize(GSource *source)
> qemu_rec_mutex_destroy(>lock);
> qemu_lockcnt_destroy(>list_lock);
> timerlistgroup_deinit(>tlg);
> +aio_context_destroy(ctx);
> }
>
> static GSourceFuncs aio_source_funcs = {
> --
> 1.8.3.1
>
Reviewed-by: Fam Zheng <f...@redhat.com>
On Wed, 05/16 19:43, Peter Xu wrote:
> On Wed, May 16, 2018 at 07:14:53PM +0800, WangJie (Pluto) wrote:
> > Hi, Peter Xu:
> > If call aio_epoll_disable() here, aio_epoll_disable() will return
> > before close ctx->epollfd,
> > Because the ctx->epoll_enabled is false in the moment.
> >
ementsov-Ogievskiy geschrieben:
> > > > > 14.05.2018 09:41, Fam Zheng wrote:
> > > > > > On Wed, 04/18 17:00, Vladimir Sementsov-Ogievskiy wrote:
> > > > > > > Is it possible, that target will change the disk, and then we
> > > > &g
On Wed, 05/16 14:39, Jie Wang wrote:
> From: w00251574
>
> When we call addIOThread, the epollfd created in aio_context_setup,
> but not close it in the process of delIOThread, so the epollfd will leak.
>
> Signed-off-by: Jie Wang
> ---
>
On Fri, 05/04 15:42, Fam Zheng wrote:
> v6: Rename QAPI enum: TCPS -> UsernetTcpState. [Daniel]
Ping?
Fam
On Tue, 05/15 20:00, Jie Wang wrote:
> When we call addIOThread, the epollfd created in aio_context_setup,
> but not close it in the process of delIOThread, so the epollfd will leak.
>
> Signed-off-by: Jie Wang
> ---
> iothread.c | 1 +
> 1 file changed, 1 insertion(+)
>
Signed-off-by: Fam Zheng <f...@redhat.com>
---
tests/qemu-iotests/214 | 268 +++
tests/qemu-iotests/214.out | 304 +
tests/qemu-iotests/group | 1 +
3 files changed, 573 insertions(+)
create mode 100755
Signed-off-by: Fam Zheng <f...@redhat.com>
---
tests/qemu-iotests/common.filter | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index c5f4bcf578..0debefed18 100644
--- a/tests/qemu-iotests/common.filter
+++ b/test
ialization.
The QAPI command parameters are mostly the same as the old create_opts
except the dropped legacy @compat6 switch, which is redundant with
@hwversion.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/vmdk.c | 461 --
qapi/block-
, but that isn't standardized, therefore it is not
documented as part of this API. Extraneous extents in the end of the provided
array are ignored.
A big part of the patch is refactoring so that BlockdevRef parsing can be
hooked in.
Please review! Thanks.
Fam Zheng (4):
vmdk: Refactor vmdk_create_extent
in the next patch.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/vmdk.c | 71 +---
1 file changed, 44 insertions(+), 27 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index 84f8bbe480..083942f806 100644
--- a/block/v
On Mon, 05/14 13:23, Vladimir Sementsov-Ogievskiy wrote:
> > So, you agree, that dropping all bitmaps after inactivation is good
> > idea.. The second question, is it possible to not drop them? Is there a
> > way, to check that disk was not changed after pair of
> > inactivate-invalidate? I have
On Wed, 04/18 17:00, Vladimir Sementsov-Ogievskiy wrote:
> Hi all.
>
> We now have the following problem:
>
> If dirty-bitmaps migration capability is enabled, persistance flag is
> dropped for all migrated bitmaps, to prevent their storing to the storage on
> inactivate.
Why do we prevent
On Fri, 05/11 08:59, Eric Blake wrote:
> On 05/11/2018 07:08 AM, Fam Zheng wrote:
> > We don't verify the request range against s->size in the I/O callbacks
> > except for raw_co_pwritev. This is wrong (especially for
> > raw_co_pwrite_zeroes and raw_co_pdiscard), so fix t
The new blk_co_copy_range interface offers a more efficient way in the
case of network based storage. Make use of it to allow faster convert
operation.
Since copy offloading cannot do zero detection ('-S') and compression
(-c), only try it when these options are not used.
Signed-off-by: Fam
It's a BlockBackend wrapper of the BDS interface.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/block-backend.c | 18 ++
include/sysemu/block-backend.h | 4
2 files changed, 22 insertions(+)
This loop is repeated a growing number times. Make a helper.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
---
block/iscsi.c | 54 +-
Issue EXTENDED COPY (LID1) command to implement the copy_range API.
The parameter data construction code is modified from libiscsi's
iscsi-dd.c.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/iscsi.c
The device designator data returned in INQUIRY command will be useful to
fill in source/target fields during copy offloading. Do this when
connecting to the target and save the data for later use.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@r
With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/file-posix.c | 96 +++--
include/block/raw-aio.h | 10 --
2 files changed, 101 insertions(+), 5 deletions(-)
Just pass down to ->file.
Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/raw-format.c | 32
1 file changed, 32 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
i
The two callbacks are implemented quite similarly to the read/write
functions: bdrv_co_copy_range_from maps for read and calls into bs->file
or bs->backing depending on the allocation status; bdrv_co_copy_range_to
maps for write and calls into bs->file.
Signed-off-by: Fam Zheng <f..
copy_file_range(2).
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/io.c| 96 +++
include/block/block.h | 32
include/block/block_int.h | 38 +++
3 files changed, 166 insertions(+)
diff
We don't verify the request range against s->size in the I/O callbacks
except for raw_co_pwritev. This is wrong (especially for
raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/raw-form
and potentially more.
As far as its usage goes, in addition to qemu-img convert, we can emulate
offloading in scsi-disk (handle EXTENDED COPY command), and use the API in
block jobs too.
Fam Zheng (10):
block: Introduce API for copy offloading
raw: Check byte range uniformly
raw: Implement copy
On Thu, 05/10 09:50, Stefan Hajnoczi wrote:
> On Wed, May 09, 2018 at 10:58:10PM +0800, Fam Zheng wrote:
> > +static off_t copy_file_range(int in_fd, off_t *in_off, int out_fd,
> > + off_t *out_off, size_t len, unsigned int
> > flag
On Wed, 05/09 10:17, Eric Blake wrote:
> On 05/09/2018 09:58 AM, Fam Zheng wrote:
> > Just pass down to ->file.
> >
> > Signed-off-by: Fam Zheng <f...@redhat.com>
> > Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
> > ---
> > block/raw-f
On Thu, 05/10 10:25, Stefan Hajnoczi wrote:
> On Wed, May 09, 2018 at 10:58:09PM +0800, Fam Zheng wrote:
> > +static int qcow2_co_copy_range_from(BlockDriverState *bs,
> > +BdrvChild *src, uint64_t src_offset,
> > +
an explicit truncation to 0, and by taking the
> appropriate file locks between those two steps.
>
> Signed-off-by: Max Reitz <mre...@redhat.com>
Reviewed-by: Fam Zheng <f...@redhat.com>
Issue EXTENDED COPY (LID1) command to implement the copy_range API.
The parameter data construction code is modified from libiscsi's
iscsi-dd.c.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/iscsi.c| 228 +++
includ
This loop is repeated a growing number times. Make a helper.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/iscsi.c | 54 +-
1 file changed, 17 insertions(+), 37 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 5811
The two callbacks are implemented quite similarly to the read/write
functions: bdrv_co_copy_range_from maps for read and calls into bs->file
or bs->backing depending on the allocation status; bdrv_co_copy_range_to
maps for write and calls into bs->file.
Signed-off-by: Fam Zheng <f..
as we are now a little more efficient on the actual
file size.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
qemu-img.c | 50 ++--
tests/qemu-iotests/178.out.qcow2 | 8 +++
2 files changed, 52 insertions(+), 6 deletions(-)
diff
emulate
offloading in scsi-disk (handle EXTENDED COPY command), and use the API in
block jobs too.
Fam Zheng (9):
block: Introduce API for copy offloading
raw: Implement copy offloading
qcow2: Implement copy offloading
file-posix: Implement bdrv_co_copy_range
iscsi: Query and save device
With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/file-posix.c | 94 +++--
include/block/raw-aio.h | 10 --
2 files changed, 99 insertions(+), 5 deletions(-)
The device designator data returned in INQUIRY command will be useful to
fill in source/target fields during copy offloading. Do this when
connecting to the target and save the data for later use.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/iscsi.c
It's a BlockBackend wrapper of the BDS interface.
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/block-backend.c | 18 ++
include/sysemu/block-backend.h | 4
2 files changed, 22 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c
Signed-off-by: Fam Zheng <f...@redhat.com>
---
block/io.c| 91 +++
include/block/block.h | 4 +++
include/block/block_int.h | 30
3 files changed, 125 insertions(+)
diff --git a/block/io.c b/block/io.c
501 - 600 of 9154 matches
Mail list logo