[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 2/8] qcow2: Cosmetic changes
From: |
Leonid Bloch |
Subject: |
[Qemu-devel] [PATCH v6 2/8] qcow2: Cosmetic changes |
Date: |
Fri, 10 Aug 2018 00:53:01 +0300 |
Some refactoring for better readability is done here.
Signed-off-by: Leonid Bloch <address@hidden>
---
block/qcow2.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index ec9e6238a0..3f4abc394e 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -790,8 +790,9 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts
*opts,
*refcount_cache_size = qemu_opt_get_size(opts,
QCOW2_OPT_REFCOUNT_CACHE_SIZE, 0);
- *l2_cache_entry_size = qemu_opt_get_size(
- opts, QCOW2_OPT_L2_CACHE_ENTRY_SIZE, s->cluster_size);
+ *l2_cache_entry_size = qemu_opt_get_size(opts,
+ QCOW2_OPT_L2_CACHE_ENTRY_SIZE,
+ s->cluster_size);
if (combined_cache_size_set) {
if (l2_cache_size_set && refcount_cache_size_set) {
@@ -823,8 +824,8 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts
*opts,
*l2_cache_size = max_l2_cache;
*refcount_cache_size = combined_cache_size - *l2_cache_size;
} else {
- *refcount_cache_size =
- MIN(combined_cache_size, min_refcount_cache);
+ *refcount_cache_size = MIN(combined_cache_size,
+ min_refcount_cache);
*l2_cache_size = combined_cache_size - *refcount_cache_size;
}
}
--
2.17.1
- [Qemu-devel] [PATCH v6 0/8] qcow2: Take the image size into account when allocating the L2 cache, Leonid Bloch, 2018/08/09
- [Qemu-devel] [PATCH v6 1/8] qcow2: Options' documentation fixes, Leonid Bloch, 2018/08/09
- [Qemu-devel] [PATCH v6 2/8] qcow2: Cosmetic changes,
Leonid Bloch <=
- [Qemu-devel] [PATCH v6 3/8] qcow2: Avoid duplication in setting the refcount cache size, Leonid Bloch, 2018/08/09
- [Qemu-devel] [PATCH v6 4/8] qcow2: Assign the L2 cache relatively to the image size, Leonid Bloch, 2018/08/09
- [Qemu-devel] [PATCH v6 6/8] qcow2: Resize the cache upon image resizing, Leonid Bloch, 2018/08/09
- [Qemu-devel] [PATCH v6 5/8] qcow2: Increase the default upper limit on the L2 cache size, Leonid Bloch, 2018/08/09
- [Qemu-devel] [PATCH v6 7/8] qcow2: Set the default cache-clean-interval to 10 minutes, Leonid Bloch, 2018/08/09
- [Qemu-devel] [PATCH v6 8/8] qcow2: Explicit number replaced by a constant, Leonid Bloch, 2018/08/09