qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] block: Fix dst reading after tail copy offloading
@ 2018-07-04  6:13 Fam Zheng
  2018-07-04  6:13 ` [Qemu-devel] [PATCH 1/2] block: Fix dst total_sectors after " Fam Zheng
  2018-07-04  6:13 ` [Qemu-devel] [PATCH 2/2] block: Add copy offloading trace points Fam Zheng
  0 siblings, 2 replies; 5+ messages in thread
From: Fam Zheng @ 2018-07-04  6:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Fam Zheng, Kevin Wolf, Max Reitz, Eric Blake,
	John Snow, Stefan Hajnoczi

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-04  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-04  6:13 [Qemu-devel] [PATCH 0/2] block: Fix dst reading after tail copy offloading Fam Zheng
2018-07-04  6:13 ` [Qemu-devel] [PATCH 1/2] block: Fix dst total_sectors after " Fam Zheng
2018-07-04  7:44   ` Kevin Wolf
2018-07-04  8:42     ` Fam Zheng
2018-07-04  6:13 ` [Qemu-devel] [PATCH 2/2] block: Add copy offloading trace points Fam Zheng

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).