On Fri, 06/29 12:24, Eric Blake wrote:
> On 06/29/2018 10:15 AM, Vladimir Sementsov-Ogievskiy wrote:
> > We need to synchronize backup job with reading from fleecing image
> > like it was done in block/replication.c.
> >
> > Otherwise, the following situation is theoretically possible:
> >
>
>
On Sun, 07/01 07:58, no-re...@patchew.org wrote:
> /var/tmp/patchew-tester-tmp-x_t1hkpk/src/block/file-posix.c:1853:13: error:
> redefinition of ‘raw_aio_attach_aio_context’
> static void raw_aio_attach_aio_context(BlockDriverState *bs,
> ^~
>
Reported-by: Max Reitz
Signed-off-by: Fam Zheng
---
block/qcow2.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 3177c72de0..1a2e498a3c 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -3292,7 +3292,6 @@ qcow2_co_copy_range_from(BlockDriverState *bs
One of them is a typo. But update both to be more readable.
Reported-by: Kevin Wolf
Signed-off-by: Fam Zheng
---
block/file-posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 829ee538d8..e04e464e72 100644
--- a/block/file
Reported-by: Max Reitz
Signed-off-by: Fam Zheng
---
block/raw-format.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/raw-format.c b/block/raw-format.c
index b78da564d4..8e648a5666 100644
--- a/block/raw-format.c
+++ b/block/raw-format.c
@@ -177,7 +177,7 @@ static
Reported-by: Max Reitz
Signed-off-by: Fam Zheng
---
block/qcow2.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 2f9e58e0c4..3177c72de0 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -3338,7 +3338,6 @@ qcow2_co_copy_range_to(BlockDriverState *bs
These are the low priority ones spotted by Kevin and Max last week.
Fam Zheng (4):
qcow2: Drop unused cluster_data
file-posix: Fix fd_open check in raw_co_copy_range_to
qcow2: Drop unreachable break
raw: Drop superfluous semicolon
block/file-posix.c | 2 +-
block/qcow2.c | 3
, so that it could still retry
with other byte ranges, whereas it shouldn't retry anymore upon ENOSYS.
Signed-off-by: Fam Zheng
---
block/file-posix.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 07bb061fe4
Not updating src_offset will result in wrong data being written to dst
image.
Reported-by: Max Reitz
Signed-off-by: Fam Zheng
---
block/qcow2.c | 1 +
tests/qemu-iotests/063 | 9 +
tests/qemu-iotests/063.out | 12
3 files changed, 22 insertions(+)
diff
These are unfortunately more serious than the previous two fixes but the
patches are not complicated.
Fam Zheng (3):
qcow2: Fix src_offset in copy offloading
iscsi: Don't blindly use designator length in response for memcpy
file-posix: Fix EINTR handling
block/file-posix.c | 17
Per SCSI definition the designator_length we receive from INQUIRY is 8,
12 or at most 16, but we should be careful because the remote iscsi
target may misbehave, otherwise we could have a buffer overflow.
Reported-by: Max Reitz
Signed-off-by: Fam Zheng
---
block/iscsi.c | 2 +-
1 file changed
In the beginning of the function, we initialize the local variable to 0,
and in the body of the function, we check the assigned values and exit
the loop immediately. So here it can never be non-zero.
Reported-by: Kevin Wolf
Signed-off-by: Fam Zheng
---
block/qcow2.c | 2 +-
1 file changed, 1
it.
Reported-by: Kevin Wolf
Signed-off-by: Fam Zheng
---
block/io.c | 59 ++
1 file changed, 28 insertions(+), 31 deletions(-)
diff --git a/block/io.c b/block/io.c
index ef4fedd364..585008a6fb 100644
--- a/block/io.c
+++ b/block/io.c
Fam Zheng (2):
qcow2: Remove dead check on !ret
block: Move request tracking to children in copy offloading
block/io.c| 59 ---
block/qcow2.c | 2 +-
2 files changed, 29 insertions(+), 32 deletions(-)
--
2.17.1
On Thu, 06/21 15:21, Nishanth Aravamudan wrote:
> When the AioContext changes, we need to associate a LinuxAioState with
> the new AioContext. Use the bdrv_attach_aio_context callback and call
> the new aio_setup_linux_aio(), which will allocate a new AioContext if
> needed, and return errors on
On Thu, 06/21 15:21, Nishanth Aravamudan wrote:
> laio_init() can fail for a couple of reasons, which will lead to a NULL
> pointer dereference in laio_attach_aio_context().
>
> To solve this, add a aio_setup_linux_aio() function which is called
> early in raw_open_common. If this fails,
On Wed, 06/13 10:06, Kevin Wolf wrote:
> Am 13.06.2018 um 09:46 hat Fam Zheng geschrieben:
> > Similar to the host_device's implementation, we check the requested
> > length against the namespace size.
> >
> > Truncation is necessary to make qcow2 creation work.
> &
Similar to the host_device's implementation, we check the requested
length against the namespace size.
Truncation is necessary to make qcow2 creation work.
Signed-off-by: Fam Zheng
---
block/nvme.c | 72
1 file changed, 72 insertions
It is wrong to leave this field as 1, as nvme_close() called in the
error handling code in nvme_file_open() will use it and try to free
s->queues again.
Clear the fields to avoid double-free.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Fam Zheng
---
block/nvme.c | 2 ++
1 file changed
On Mon, 06/11 15:04, Jie Wang wrote:
> if laio_init create linux_aio failed and return NULL, NULL pointer
> dereference will occur when laio_attach_aio_context dereference
> linux_aio in aio_get_linux_aio, so add assert to avoid it.
>
> Signed-off-by: Jie Wang
> ---
> util/async.c | 1 +
> 1
This makes the mirror job to try offloaded copy. If it fails, error
action will not be taken yet, instead the failed cluster and all the
subsequent ones will fall back to bounce buffer.
Signed-off-by: Fam Zheng
---
block/mirror.c | 71 +-
block
Similar to bdrv_co_block_status_from_backing we add the two passthrough
callbacks for copy_range. This will be used by the block driver filters
so that they can support copy offloading.
Signed-off-by: Fam Zheng
---
block/io.c| 24
include/block
differentiation in parameters, refactor a bit.
Move the per-request fields to a union and create one struct for each
type. While at it also move the bytes parameter from BlkAioEmAIOCB to
BlkRwCo.
Signed-off-by: Fam Zheng
---
block/block-backend.c | 211 +++---
1 file
EINTR should be checked against errno, not ret. While fixing the bug,
collecting the branches with a switch block.
Signed-off-by: Fam Zheng
---
block/file-posix.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
Signed-off-by: Fam Zheng
---
block/block-backend.c | 36 ++
include/sysemu/block-backend.h | 4
2 files changed, 40 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c
index e20a204bee..36d928e13d 100644
--- a/block/block
This avoids the wasteful cluster allocation in qcow2 before actually
trying an unsupported copy range call, for example.
Signed-off-by: Fam Zheng
---
block.c | 12
block/file-posix.c| 9 +
block/io.c| 3 +++
block/iscsi.c
This is the third part of copy offloading work. The first patches are fixes and
improvements in preparation for enabling mirror job. The last patch does a
similar change to the backup patch: it inserts a blk_aio_copy_range call before
the usual bounce buffer code in mirror_iteration.
Fam Zheng (6
On Tue, 06/05 13:22, Stefan Hajnoczi wrote:
> On Tue, Jun 05, 2018 at 04:07:10PM +0800, Fam Zheng wrote:
> > The implementation is similar to the 'qemu-img convert'. In the
> > beginning of the job, offloaded copy is attempted. If it fails, further
> > I/O will go throug
The implementation is similar to the 'qemu-img convert'. In the
beginning of the job, offloaded copy is attempted. If it fails, further
I/O will go through the existing bounce buffer code path.
Signed-off-by: Fam Zheng
---
block/backup.c | 150
pports it.
v3: Don't forget coroutine_fn. [Stefan]
Don't reset job->use_copy_range redundantly. [Stefan]
v2: Use helper functions. [Stefan]
Fam Zheng (2):
block: Honour BDRV_REQ_NO_SERIALISING in copy range
backup: Use copy offloading
block/backup.c
This semantics is needed by drive-backup so implement it before using
this API there.
Signed-off-by: Fam Zheng
---
block/io.c| 6 --
include/block/block.h | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/block/io.c b/block/io.c
index b7beaeeb9f
This semantics is needed by drive-backup so implement it before using
this API there.
Signed-off-by: Fam Zheng
---
block/io.c| 6 --
include/block/block.h | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/block/io.c b/block/io.c
index b7beaeeb9f
The implementation is similar to the 'qemu-img convert'. In the
beginning of the job, offloaded copy is attempted. If it fails, further
I/O will go through the existing bounce buffer code path.
Signed-off-by: Fam Zheng
---
block/backup.c | 151
pports it.
v2: Use helper functions. [Stefan]
Fam Zheng (2):
block: Honour BDRV_REQ_NO_SERIALISING in copy range
backup: Use copy offloading
block/backup.c| 151 ++
block/io.c| 6 +-
block/trace-events| 1 +
include/block/b
On Fri, 06/01 15:00, Daniel P. Berrangé wrote:
> On Fri, Jun 01, 2018 at 09:33:59PM +0800, Fam Zheng wrote:
> > On Fri, 06/01 13:43, Daniel P. Berrangé wrote:
> > > On Fri, Jun 01, 2018 at 05:18:35PM +0800, Fam Zheng wrote:
> > > > When hot-plugging a block device fai
On Fri, 06/01 07:32, Eric Blake wrote:
> On 06/01/2018 04:18 AM, Fam Zheng wrote:
> > When hot-plugging a block device fails due to image locking errors,
> > users won't see the helpful 'Is another process using the image?'
> > message in QMP because currently the error hin
On Fri, 06/01 13:43, Daniel P. Berrangé wrote:
> On Fri, Jun 01, 2018 at 05:18:35PM +0800, Fam Zheng wrote:
> > When hot-plugging a block device fails due to image locking errors,
> > users won't see the helpful 'Is another process using the image?'
> > message in QMP becaus
On Fri, 06/01 10:37, Stefan Hajnoczi wrote:
> On Thu, May 31, 2018 at 11:45:17PM -0700, no-re...@patchew.org wrote:
> > /var/tmp/patchew-tester-tmp-2l7s8dte/src/block/iscsi.c: In function
> > ‘iscsi_populate_target_desc’:
> > /var/tmp/patchew-tester-tmp-2l7s8dte/src/block/iscsi.c:2242:15: error:
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
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
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
Reviewed-by: Stefan Hajnoczi
---
block/iscsi.c| 219 +++
include/scsi
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 @@ s
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/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
Reviewed-by: Stefan Hajnoczi
---
block/iscsi.c | 41
With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng
---
block/file-posix.c | 98 +++--
configure | 17 +++
include/block/raw-aio.h | 10 -
3 files changed, 120 insertions(+), 5
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.
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
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 bdrv_co_copy_range
iscsi
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(+)
diff --git
On Thu, 05/31 23:45, no-re...@patchew.org wrote:
> Hi,
>
> This series failed build test on s390x host. Please find the details below.
>
> Type: series
> Message-id: 20180601062849.28641-1-f...@redhat.com
> Subject: [Qemu-devel] [PATCH v8 00/11] qemu-img convert with copy offloading
>
> ===
some change to consume that data.
Before that is fully sorted out, let's just do the easy fix by joining
the two lines.
Signed-off-by: Fam Zheng
---
block/file-posix.c | 10 ++--
tests/qemu-iotests/153.out | 99 +-
tests/qemu-iotests/182.out | 3 +-
3
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
Reviewed-by: Stefan Hajnoczi
---
block/iscsi.c| 219 +++
include/scsi
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
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
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
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/iscsi.c
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.
Signed-off-by: Fam Zheng
---
tests/docker/dockerfiles/fedora.docker | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/docker/dockerfiles/fedora.docker
b/tests/docker/dockerfiles/fedora.docker
index b706f42405..65d7761cf5 100644
--- a/tests/docker/dockerfiles
With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng
---
block/file-posix.c | 98 +++--
configure | 17 +++
include/block/raw-aio.h | 10 -
3 files changed, 120 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
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 @@ s
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(+)
diff --git
command), and use the API in
block jobs too.
Fam Zheng (11):
docker: Update fedora image to 28
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
On Wed, 05/30 17:06, Stefan Hajnoczi wrote:
> On Tue, May 29, 2018 at 01:59:49PM +0800, Fam Zheng wrote:
> > v7: Fix qcow2.
> >
> > v6: Pick up rev-by from Stefan and Eric.
> > Tweak patch 2 commit message.
> >
> > v5: - Fix raw offset/byt
The implementation is similar to the 'qemu-img convert'. In the
beginning of the job, offloaded copy is attempted. If it fails, further
I/O will go through the existing bounce buffer code path.
Signed-off-by: Fam Zheng
---
block/backup.c | 93
This semantics is needed by drive-backup so implement it before using
this API there.
Signed-off-by: Fam Zheng
---
block/io.c| 6 --
include/block/block.h | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/block/io.c b/block/io.c
index b7beaeeb9f
pports it.
Fam Zheng (2):
block: Honour BDRV_REQ_NO_SERIALISING in copy range
backup: Use copy offloading
block/backup.c| 93 +--
block/io.c| 6 ++--
block/trace-events| 1 +
include/block/block.h | 5 +--
4 files c
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
Reviewed-by: Stefan Hajnoczi
---
block/iscsi.c| 219 +++
include
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
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
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
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
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
-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
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
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
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.
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
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>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
block/file-posix.c | 96 +++--
include/block/raw-aio.h |
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 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 <stefa...@redhat.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
Signed-off-by: Fam Zhen
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(+)
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
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
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
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
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 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
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(+)
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
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..
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 +-
201 - 300 of 2965 matches
Mail list logo