backup: Use copy offloading
commit9ded4a0114968e98b41494fc035ba14f84cdf700
authorFam Zheng <famz@redhat.com>
Tue, 3 Jul 2018 02:37:58 +0000 (3 10:37 +0800)
committerJeff Cody <jcody@redhat.com>
Tue, 3 Jul 2018 03:23:45 +0000 (2 23:23 -0400)
tree17ecd45ddb28747781507d8d5d8382b0560db60d
parentdee12de89380483656072f775f5ef99f4426f966
backup: Use copy offloading

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.

Then, as Kevin pointed out, both this and qemu-img convert can benefit
from a local check if one request fails because of, for example, the
offset is beyond EOF, but another may well be accepted by the protocol
layer. This will be implemented separately.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 20180703023758.14422-4-famz@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/backup.c
block/trace-events