diff options
| author | Fam Zheng | 2018-07-10 08:31:24 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2018-07-10 16:46:22 +0200 |
| commit | cd47d792d7a27a57f4b621e2ff1ed8f4e83de1e9 (patch) | |
| tree | 14b32cab5683d54a74d576768cc0c1cce8fb90a7 /include/exec | |
| parent | block: Fix bdrv_co_truncate overlap check (diff) | |
| download | qemu-cd47d792d7a27a57f4b621e2ff1ed8f4e83de1e9.tar.gz qemu-cd47d792d7a27a57f4b621e2ff1ed8f4e83de1e9.tar.xz qemu-cd47d792d7a27a57f4b621e2ff1ed8f4e83de1e9.zip | |
block: Use common write req handling in truncate
Truncation is the last to convert from open coded req handling to
reusing helpers. This time the permission check in prepare has to adapt
to the new caller: it checks a different permission bit, and doesn't
trigger the before write notifier.
Also, truncation should always trigger a bs->total_sectors update and in
turn call parent resize_cb. Update the condition in finish helper, too.
It's intended to do a duplicated bs->read_only check before calling
bdrv_co_write_req_prepare() so that we can be more informative with the
error message, as bdrv_co_write_req_prepare() doesn't have Error
parameter.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions
