[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 13/16] block/qcow2: Rename "fail_block" to just "
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v4 13/16] block/qcow2: Rename "fail_block" to just "fail" |
Date: |
Tue, 13 Jun 2017 22:21:04 +0200 |
Now alloc_refcount_block() only contains a single fail label, so it
makes more sense to just name it "fail" instead of "fail_block".
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
block/qcow2-refcount.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 0872c25..9d109e9 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -381,7 +381,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
ret = qcow2_cache_get_empty(bs, s->refcount_block_cache, new_block,
refcount_block);
if (ret < 0) {
- goto fail_block;
+ goto fail;
}
memset(*refcount_block, 0, s->cluster_size);
@@ -396,12 +396,12 @@ static int alloc_refcount_block(BlockDriverState *bs,
ret = update_refcount(bs, new_block, s->cluster_size, 1, false,
QCOW2_DISCARD_NEVER);
if (ret < 0) {
- goto fail_block;
+ goto fail;
}
ret = qcow2_cache_flush(bs, s->refcount_block_cache);
if (ret < 0) {
- goto fail_block;
+ goto fail;
}
/* Initialize the new refcount block only after updating its refcount,
@@ -409,7 +409,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
ret = qcow2_cache_get_empty(bs, s->refcount_block_cache, new_block,
refcount_block);
if (ret < 0) {
- goto fail_block;
+ goto fail;
}
memset(*refcount_block, 0, s->cluster_size);
@@ -420,7 +420,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
qcow2_cache_entry_mark_dirty(bs, s->refcount_block_cache, *refcount_block);
ret = qcow2_cache_flush(bs, s->refcount_block_cache);
if (ret < 0) {
- goto fail_block;
+ goto fail;
}
/* If the refcount table is big enough, just hook the block up there */
@@ -431,7 +431,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
s->refcount_table_offset + refcount_table_index * sizeof(uint64_t),
&data64, sizeof(data64));
if (ret < 0) {
- goto fail_block;
+ goto fail;
}
s->refcount_table[refcount_table_index] = new_block;
@@ -495,7 +495,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
* allocated metadata. Make the caller search some new space. */
return -EAGAIN;
-fail_block:
+fail:
if (*refcount_block != NULL) {
qcow2_cache_put(bs, s->refcount_block_cache, refcount_block);
}
--
2.9.4
- [Qemu-devel] [PATCH v4 03/16] block: Add PreallocMode to blk_truncate(), (continued)
- [Qemu-devel] [PATCH v4 03/16] block: Add PreallocMode to blk_truncate(), Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 04/16] qemu-img: Expose PreallocMode for resizing, Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 05/16] block/file-posix: Small fixes in raw_create(), Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 06/16] block/file-posix: Extract raw_regular_truncate(), Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 09/16] block/qcow2: Generalize preallocate(), Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 07/16] block/file-posix: Generalize raw_regular_truncate, Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 08/16] block/file-posix: Preallocation for truncate, Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 10/16] block/qcow2: Lock s->lock in preallocate(), Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 11/16] block/qcow2: Metadata preallocation for truncate, Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 12/16] block/qcow2: Add qcow2_refcount_area(), Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 13/16] block/qcow2: Rename "fail_block" to just "fail",
Max Reitz <=
- [Qemu-devel] [PATCH v4 14/16] block/qcow2: falloc/full preallocating growth, Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 15/16] iotests: Add preallocated resize test for raw, Max Reitz, 2017/06/13
- [Qemu-devel] [PATCH v4 16/16] iotests: Add preallocated growth test for qcow2, Max Reitz, 2017/06/13
- Re: [Qemu-devel] [PATCH v4 00/16] block: Preallocated truncate, Stefan Hajnoczi, 2017/06/19