[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/7] blockjob: consolidate SLICE_TIME definition
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/7] blockjob: consolidate SLICE_TIME definition |
Date: |
Thu, 14 Dec 2017 09:51:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 14/12/2017 01:59, John Snow wrote:
> They're all the same. If it actually becomes important to configure it,
> it can become a job or driver property.
>
> Signed-off-by: John Snow <address@hidden>
> ---
> block/backup.c | 1 -
> block/commit.c | 2 --
> block/mirror.c | 1 -
> block/stream.c | 2 --
> include/block/blockjob_int.h | 2 ++
> 5 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/block/backup.c b/block/backup.c
> index 99e6bcc748..d71b25c017 100644
> --- a/block/backup.c
> +++ b/block/backup.c
> @@ -27,7 +27,6 @@
> #include "qemu/error-report.h"
>
> #define BACKUP_CLUSTER_SIZE_DEFAULT (1 << 16)
> -#define SLICE_TIME 100000000ULL /* ns */
>
> typedef struct BackupBlockJob {
> BlockJob common;
> diff --git a/block/commit.c b/block/commit.c
> index c5327551ce..873e749d50 100644
> --- a/block/commit.c
> +++ b/block/commit.c
> @@ -31,8 +31,6 @@ enum {
> COMMIT_BUFFER_SIZE = 512 * 1024, /* in bytes */
> };
>
> -#define SLICE_TIME 100000000ULL /* ns */
> -
> typedef struct CommitBlockJob {
> BlockJob common;
> RateLimit limit;
> diff --git a/block/mirror.c b/block/mirror.c
> index d35c688faa..eef5b598f5 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -22,7 +22,6 @@
> #include "qemu/ratelimit.h"
> #include "qemu/bitmap.h"
>
> -#define SLICE_TIME 100000000ULL /* ns */
> #define MAX_IN_FLIGHT 16
> #define MAX_IO_BYTES (1 << 20) /* 1 Mb */
> #define DEFAULT_MIRROR_BUF_SIZE (MAX_IN_FLIGHT * MAX_IO_BYTES)
> diff --git a/block/stream.c b/block/stream.c
> index 499cdacdb0..e85af18c54 100644
> --- a/block/stream.c
> +++ b/block/stream.c
> @@ -29,8 +29,6 @@ enum {
> STREAM_BUFFER_SIZE = 512 * 1024, /* in bytes */
> };
>
> -#define SLICE_TIME 100000000ULL /* ns */
> -
> typedef struct StreamBlockJob {
> BlockJob common;
> RateLimit limit;
> diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h
> index c9b23b0cc9..209fa1bb3e 100644
> --- a/include/block/blockjob_int.h
> +++ b/include/block/blockjob_int.h
> @@ -29,6 +29,8 @@
> #include "block/blockjob.h"
> #include "block/block.h"
>
> +#define SLICE_TIME 100000000ULL /* ns */
> +
> /**
> * BlockJobDriver:
> *
>
Reviewed-by: Paolo Bonzini <address@hidden>
- [Qemu-devel] [PATCH 0/7] blockjob: refactor mirror_throttle, John Snow, 2017/12/13
- [Qemu-devel] [PATCH 2/7] blockjob: consolidate SLICE_TIME definition, John Snow, 2017/12/13
- [Qemu-devel] [PATCH 3/7] blockjob: create block_job_throttle, John Snow, 2017/12/13
- [Qemu-devel] [PATCH 6/7] block/stream: use block_job_throttle, John Snow, 2017/12/13
- [Qemu-devel] [PATCH 7/7] block/backup: use block_job_throttle, John Snow, 2017/12/13