block: Extract common write req handling
commit85fe24796ddf70f2b6a5045952826aedffa55ca2
authorFam Zheng <famz@redhat.com>
Tue, 10 Jul 2018 06:31:19 +0000 (10 14:31 +0800)
committerKevin Wolf <kwolf@redhat.com>
Tue, 10 Jul 2018 14:01:52 +0000 (10 16:01 +0200)
tree2d1708ddbfa8b14fee2cf2590af271052caeed26
parent22931a15336e8b7726965c699981fd108620014b
block: Extract common write req handling

As a mechanical refactoring patch, this is the first step towards
unified and more correct write code paths. This is helpful because
multiple BlockDriverState fields need to be updated after modifying
image data, and it's hard to maintain in multiple places such as copy
offload, discard and truncate.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c