[Qemu-devel] [PATCH v3 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate()

Max Reitz posted 4 patches 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170328205129.15138-1-mreitz@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
include/block/block.h          |  2 +-
include/block/block_int.h      |  2 +-
include/sysemu/block-backend.h |  2 +-
block.c                        | 16 +++++++++++-----
block/blkdebug.c               |  4 ++--
block/block-backend.c          |  5 +++--
block/commit.c                 |  5 +++--
block/crypto.c                 |  5 +++--
block/file-posix.c             | 19 +++++++++++++------
block/file-win32.c             |  6 +++---
block/gluster.c                |  7 +++++--
block/iscsi.c                  |  6 ++++--
block/mirror.c                 |  2 +-
block/nfs.c                    | 12 ++++++++++--
block/parallels.c              | 13 ++++++++-----
block/qcow.c                   |  6 +++---
block/qcow2-refcount.c         |  5 ++++-
block/qcow2.c                  | 24 +++++++++++++++---------
block/qed.c                    |  8 +++++---
block/raw-format.c             |  6 ++++--
block/rbd.c                    |  3 ++-
block/sheepdog.c               | 14 ++++++--------
block/vdi.c                    |  4 ++--
block/vhdx-log.c               |  2 +-
block/vhdx.c                   | 25 ++++++++++++++++++-------
block/vmdk.c                   | 13 +++----------
block/vpc.c                    | 13 +++++++------
blockdev.c                     | 21 +--------------------
qemu-img.c                     | 17 ++++-------------
qemu-io-cmds.c                 |  5 +++--
30 files changed, 147 insertions(+), 125 deletions(-)
[Qemu-devel] [PATCH v3 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate()
Posted by Max Reitz 7 years ago
Having an Error parameter for these functions makes sense because we
sometimes want a bit more information than just "Something failed". Some
drivers already use error_report() and the like to emit this additional
information, so it's rather obvious that we do want a real error object
here.


v3:
- Patch 2: Keep "Could not resize image" message in qcow2_create2() by
           using error_prepend() [Kevin]
- Patch 3: Dropped archipelago
- Patch 4:
  - Keep errno information where available [Kevin]
  - Make all drivers generate error messages [Stefan/Eric]
  - Drop generic error message from bdrv_truncate() [Stefan/Eric]


Max Reitz (4):
  block/vhdx: Make vhdx_create() always set errp
  block: Add errp to b{lk,drv}_truncate()
  block: Add errp to BD.bdrv_truncate()
  block: Add .bdrv_truncate() error messages

 include/block/block.h          |  2 +-
 include/block/block_int.h      |  2 +-
 include/sysemu/block-backend.h |  2 +-
 block.c                        | 16 +++++++++++-----
 block/blkdebug.c               |  4 ++--
 block/block-backend.c          |  5 +++--
 block/commit.c                 |  5 +++--
 block/crypto.c                 |  5 +++--
 block/file-posix.c             | 19 +++++++++++++------
 block/file-win32.c             |  6 +++---
 block/gluster.c                |  7 +++++--
 block/iscsi.c                  |  6 ++++--
 block/mirror.c                 |  2 +-
 block/nfs.c                    | 12 ++++++++++--
 block/parallels.c              | 13 ++++++++-----
 block/qcow.c                   |  6 +++---
 block/qcow2-refcount.c         |  5 ++++-
 block/qcow2.c                  | 24 +++++++++++++++---------
 block/qed.c                    |  8 +++++---
 block/raw-format.c             |  6 ++++--
 block/rbd.c                    |  3 ++-
 block/sheepdog.c               | 14 ++++++--------
 block/vdi.c                    |  4 ++--
 block/vhdx-log.c               |  2 +-
 block/vhdx.c                   | 25 ++++++++++++++++++-------
 block/vmdk.c                   | 13 +++----------
 block/vpc.c                    | 13 +++++++------
 blockdev.c                     | 21 +--------------------
 qemu-img.c                     | 17 ++++-------------
 qemu-io-cmds.c                 |  5 +++--
 30 files changed, 147 insertions(+), 125 deletions(-)

-- 
2.12.1


Re: [Qemu-devel] [PATCH v3 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate()
Posted by Max Reitz 7 years ago
On 28.03.2017 22:51, Max Reitz wrote:
> Having an Error parameter for these functions makes sense because we
> sometimes want a bit more information than just "Something failed". Some
> drivers already use error_report() and the like to emit this additional
> information, so it's rather obvious that we do want a real error object
> here.
> 
> 
> v3:
> - Patch 2: Keep "Could not resize image" message in qcow2_create2() by
>            using error_prepend() [Kevin]
> - Patch 3: Dropped archipelago
> - Patch 4:
>   - Keep errno information where available [Kevin]
>   - Make all drivers generate error messages [Stefan/Eric]
>   - Drop generic error message from bdrv_truncate() [Stefan/Eric]

Oops, forgot the backport-diff against v2, here you go:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences,
respectively

001/4:[----] [--] 'block/vhdx: Make vhdx_create() always set errp'
002/4:[0001] [FC] 'block: Add errp to b{lk,drv}_truncate()'
003/4:[0003] [FC] 'block: Add errp to BD.bdrv_truncate()'
004/4:[0025] [FC] 'block: Add .bdrv_truncate() error messages'


Max

> Max Reitz (4):
>   block/vhdx: Make vhdx_create() always set errp
>   block: Add errp to b{lk,drv}_truncate()
>   block: Add errp to BD.bdrv_truncate()
>   block: Add .bdrv_truncate() error messages
> 
>  include/block/block.h          |  2 +-
>  include/block/block_int.h      |  2 +-
>  include/sysemu/block-backend.h |  2 +-
>  block.c                        | 16 +++++++++++-----
>  block/blkdebug.c               |  4 ++--
>  block/block-backend.c          |  5 +++--
>  block/commit.c                 |  5 +++--
>  block/crypto.c                 |  5 +++--
>  block/file-posix.c             | 19 +++++++++++++------
>  block/file-win32.c             |  6 +++---
>  block/gluster.c                |  7 +++++--
>  block/iscsi.c                  |  6 ++++--
>  block/mirror.c                 |  2 +-
>  block/nfs.c                    | 12 ++++++++++--
>  block/parallels.c              | 13 ++++++++-----
>  block/qcow.c                   |  6 +++---
>  block/qcow2-refcount.c         |  5 ++++-
>  block/qcow2.c                  | 24 +++++++++++++++---------
>  block/qed.c                    |  8 +++++---
>  block/raw-format.c             |  6 ++++--
>  block/rbd.c                    |  3 ++-
>  block/sheepdog.c               | 14 ++++++--------
>  block/vdi.c                    |  4 ++--
>  block/vhdx-log.c               |  2 +-
>  block/vhdx.c                   | 25 ++++++++++++++++++-------
>  block/vmdk.c                   | 13 +++----------
>  block/vpc.c                    | 13 +++++++------
>  blockdev.c                     | 21 +--------------------
>  qemu-img.c                     | 17 ++++-------------
>  qemu-io-cmds.c                 |  5 +++--
>  30 files changed, 147 insertions(+), 125 deletions(-)
> 


Re: [Qemu-devel] [PATCH v3 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate()
Posted by Stefan Hajnoczi 7 years ago
On Tue, Mar 28, 2017 at 10:51:25PM +0200, Max Reitz wrote:
> Having an Error parameter for these functions makes sense because we
> sometimes want a bit more information than just "Something failed". Some
> drivers already use error_report() and the like to emit this additional
> information, so it's rather obvious that we do want a real error object
> here.
> 
> 
> v3:
> - Patch 2: Keep "Could not resize image" message in qcow2_create2() by
>            using error_prepend() [Kevin]
> - Patch 3: Dropped archipelago
> - Patch 4:
>   - Keep errno information where available [Kevin]
>   - Make all drivers generate error messages [Stefan/Eric]
>   - Drop generic error message from bdrv_truncate() [Stefan/Eric]
> 
> 
> Max Reitz (4):
>   block/vhdx: Make vhdx_create() always set errp
>   block: Add errp to b{lk,drv}_truncate()
>   block: Add errp to BD.bdrv_truncate()
>   block: Add .bdrv_truncate() error messages
> 
>  include/block/block.h          |  2 +-
>  include/block/block_int.h      |  2 +-
>  include/sysemu/block-backend.h |  2 +-
>  block.c                        | 16 +++++++++++-----
>  block/blkdebug.c               |  4 ++--
>  block/block-backend.c          |  5 +++--
>  block/commit.c                 |  5 +++--
>  block/crypto.c                 |  5 +++--
>  block/file-posix.c             | 19 +++++++++++++------
>  block/file-win32.c             |  6 +++---
>  block/gluster.c                |  7 +++++--
>  block/iscsi.c                  |  6 ++++--
>  block/mirror.c                 |  2 +-
>  block/nfs.c                    | 12 ++++++++++--
>  block/parallels.c              | 13 ++++++++-----
>  block/qcow.c                   |  6 +++---
>  block/qcow2-refcount.c         |  5 ++++-
>  block/qcow2.c                  | 24 +++++++++++++++---------
>  block/qed.c                    |  8 +++++---
>  block/raw-format.c             |  6 ++++--
>  block/rbd.c                    |  3 ++-
>  block/sheepdog.c               | 14 ++++++--------
>  block/vdi.c                    |  4 ++--
>  block/vhdx-log.c               |  2 +-
>  block/vhdx.c                   | 25 ++++++++++++++++++-------
>  block/vmdk.c                   | 13 +++----------
>  block/vpc.c                    | 13 +++++++------
>  blockdev.c                     | 21 +--------------------
>  qemu-img.c                     | 17 ++++-------------
>  qemu-io-cmds.c                 |  5 +++--
>  30 files changed, 147 insertions(+), 125 deletions(-)
> 
> -- 
> 2.12.1
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [Qemu-devel] [PATCH v3 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate()
Posted by Max Reitz 7 years ago
On 28.03.2017 22:51, Max Reitz wrote:
> Having an Error parameter for these functions makes sense because we
> sometimes want a bit more information than just "Something failed". Some
> drivers already use error_report() and the like to emit this additional
> information, so it's rather obvious that we do want a real error object
> here.
> 
> 
> v3:
> - Patch 2: Keep "Could not resize image" message in qcow2_create2() by
>            using error_prepend() [Kevin]
> - Patch 3: Dropped archipelago
> - Patch 4:
>   - Keep errno information where available [Kevin]
>   - Make all drivers generate error messages [Stefan/Eric]
>   - Drop generic error message from bdrv_truncate() [Stefan/Eric]
> 
> 
> Max Reitz (4):
>   block/vhdx: Make vhdx_create() always set errp
>   block: Add errp to b{lk,drv}_truncate()
>   block: Add errp to BD.bdrv_truncate()
>   block: Add .bdrv_truncate() error messages
> 
>  include/block/block.h          |  2 +-
>  include/block/block_int.h      |  2 +-
>  include/sysemu/block-backend.h |  2 +-
>  block.c                        | 16 +++++++++++-----
>  block/blkdebug.c               |  4 ++--
>  block/block-backend.c          |  5 +++--
>  block/commit.c                 |  5 +++--
>  block/crypto.c                 |  5 +++--
>  block/file-posix.c             | 19 +++++++++++++------
>  block/file-win32.c             |  6 +++---
>  block/gluster.c                |  7 +++++--
>  block/iscsi.c                  |  6 ++++--
>  block/mirror.c                 |  2 +-
>  block/nfs.c                    | 12 ++++++++++--
>  block/parallels.c              | 13 ++++++++-----
>  block/qcow.c                   |  6 +++---
>  block/qcow2-refcount.c         |  5 ++++-
>  block/qcow2.c                  | 24 +++++++++++++++---------
>  block/qed.c                    |  8 +++++---
>  block/raw-format.c             |  6 ++++--
>  block/rbd.c                    |  3 ++-
>  block/sheepdog.c               | 14 ++++++--------
>  block/vdi.c                    |  4 ++--
>  block/vhdx-log.c               |  2 +-
>  block/vhdx.c                   | 25 ++++++++++++++++++-------
>  block/vmdk.c                   | 13 +++----------
>  block/vpc.c                    | 13 +++++++------
>  blockdev.c                     | 21 +--------------------
>  qemu-img.c                     | 17 ++++-------------
>  qemu-io-cmds.c                 |  5 +++--
>  30 files changed, 147 insertions(+), 125 deletions(-)

Applied to my block-next branch:

https://github.com/XanClic/qemu/commits/block-next

Max