[PATCH v8 0/4] delete created files when block_crypto_co_create_opts_luks fails

Daniel Henrique Barboza posted 4 patches 4 years, 5 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191111170131.13742-1-danielhb413@gmail.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
There is a newer version of this series
block.c                    | 26 +++++++++++++++
block/crypto.c             | 18 ++++++++++
block/file-posix.c         | 23 +++++++++++++
include/block/block.h      |  1 +
include/block/block_int.h  |  4 +++
tests/qemu-iotests/273     | 67 ++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/273.out | 11 +++++++
tests/qemu-iotests/group   |  1 +
8 files changed, 151 insertions(+)
create mode 100755 tests/qemu-iotests/273
create mode 100644 tests/qemu-iotests/273.out
[PATCH v8 0/4] delete created files when block_crypto_co_create_opts_luks fails
Posted by Daniel Henrique Barboza 4 years, 5 months ago
changes from previous version 7 [1], all suggested by Kevin Wolf:

- patch 1:
    * removed function comment of raw_co_delete_file;
    * removed 'done' label from raw_co_delete_file;
    * removed 'local' remark from bdrv_co_delete_file comment. The comment
      is now single-lined;
    * added missing space in the commit msg;
- patch 2:
    * ditched bdrv_delete_co_entry and bdrv_delete_file, now it's a single
      coroutine_fn bdrv_co_delete_file;
    * BlockDriverState != NULL dropped - the caller will need to ensure it
      is not null;
    * changed the error message of '!bs->drv' condition;
    * s/delete/deletion in the error message of !bs->drv->bdrv_co_delete_file;
    * 'out' label removed - function will return immediately on error;
- patch 3:
    * check for (ret && bs);
    * drop the ENOENT verification;
    * do not prepend the filename in the error message;
    * removed an extra blank line.


[1] https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg00282.html

Daniel Henrique Barboza (4):
  block: introducing 'bdrv_co_delete_file' interface
  block.c: adding bdrv_co_delete_file
  crypto.c: cleanup created file when block_crypto_co_create_opts_luks
    fails
  qemu-iotests: adding LUKS cleanup for non-UTF8 secret error

 block.c                    | 26 +++++++++++++++
 block/crypto.c             | 18 ++++++++++
 block/file-posix.c         | 23 +++++++++++++
 include/block/block.h      |  1 +
 include/block/block_int.h  |  4 +++
 tests/qemu-iotests/273     | 67 ++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/273.out | 11 +++++++
 tests/qemu-iotests/group   |  1 +
 8 files changed, 151 insertions(+)
 create mode 100755 tests/qemu-iotests/273
 create mode 100644 tests/qemu-iotests/273.out

-- 
2.21.0


Re: [PATCH v8 0/4] delete created files when block_crypto_co_create_opts_luks fails
Posted by Daniel Henrique Barboza 4 years, 4 months ago
Ping

On 11/11/19 2:01 PM, Daniel Henrique Barboza wrote:
> changes from previous version 7 [1], all suggested by Kevin Wolf:
> 
> - patch 1:
>      * removed function comment of raw_co_delete_file;
>      * removed 'done' label from raw_co_delete_file;
>      * removed 'local' remark from bdrv_co_delete_file comment. The comment
>        is now single-lined;
>      * added missing space in the commit msg;
> - patch 2:
>      * ditched bdrv_delete_co_entry and bdrv_delete_file, now it's a single
>        coroutine_fn bdrv_co_delete_file;
>      * BlockDriverState != NULL dropped - the caller will need to ensure it
>        is not null;
>      * changed the error message of '!bs->drv' condition;
>      * s/delete/deletion in the error message of !bs->drv->bdrv_co_delete_file;
>      * 'out' label removed - function will return immediately on error;
> - patch 3:
>      * check for (ret && bs);
>      * drop the ENOENT verification;
>      * do not prepend the filename in the error message;
>      * removed an extra blank line.
> 
> 
> [1] https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg00282.html
> 
> Daniel Henrique Barboza (4):
>    block: introducing 'bdrv_co_delete_file' interface
>    block.c: adding bdrv_co_delete_file
>    crypto.c: cleanup created file when block_crypto_co_create_opts_luks
>      fails
>    qemu-iotests: adding LUKS cleanup for non-UTF8 secret error
> 
>   block.c                    | 26 +++++++++++++++
>   block/crypto.c             | 18 ++++++++++
>   block/file-posix.c         | 23 +++++++++++++
>   include/block/block.h      |  1 +
>   include/block/block_int.h  |  4 +++
>   tests/qemu-iotests/273     | 67 ++++++++++++++++++++++++++++++++++++++
>   tests/qemu-iotests/273.out | 11 +++++++
>   tests/qemu-iotests/group   |  1 +
>   8 files changed, 151 insertions(+)
>   create mode 100755 tests/qemu-iotests/273
>   create mode 100644 tests/qemu-iotests/273.out
>