[Qemu-devel] [PATCH 0/2] block: Fix dst reading after tail copy offloading

Fam Zheng posted 2 patches 7 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180704061320.2041-1-famz@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
There is a newer version of this series
block/file-posix.c | 2 ++
block/io.c         | 6 ++++++
block/iscsi.c      | 3 +++
block/trace-events | 6 ++++++
4 files changed, 17 insertions(+)
[Qemu-devel] [PATCH 0/2] block: Fix dst reading after tail copy offloading
Posted by Fam Zheng 7 years, 4 months ago
Qcow2 allocates new clusters after the end of the file. If it is the destinaton
of copy offloading, we must adjust dst->bs->total_sectors. Otherwise, further
reads will drop to the "beyond EOF" code path and return zeroes, which problem
is caught by iotests 222.

Follow the logic in the normal write code and update bs->total_sectors after
I/O is done.

While at it, add a few convenient trace points to aid future debug experiences
in the topic.

Fam Zheng (2):
  block: Fix dst total_sectors after copy offloading
  block: Add copy offloading trace points

 block/file-posix.c | 2 ++
 block/io.c         | 6 ++++++
 block/iscsi.c      | 3 +++
 block/trace-events | 6 ++++++
 4 files changed, 17 insertions(+)

-- 
2.17.1