[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] Re: [PATCH 02/24] io-controller: Core of the elevator fair queuing
- From: Gui Jianfeng <guijianfeng cn fujitsu com>
- To: Vivek Goyal <vgoyal redhat com>
- Cc: dhaval linux vnet ibm com, peterz infradead org, dm-devel redhat com, dpshah google com, jens axboe oracle com, agk redhat com, balbir linux vnet ibm com, paolo valente unimore it, jmarchan redhat com, fernando oss ntt co jp, mikew google com, jmoyer redhat com, nauman google com, m-ikeda ds jp nec com, lizf cn fujitsu com, fchecconi gmail com, s-uchida ap jp nec com, containers lists linux-foundation org, linux-kernel vger kernel org, akpm linux-foundation org, righi andrea gmail com
- Subject: [dm-devel] Re: [PATCH 02/24] io-controller: Core of the elevator fair queuing
- Date: Thu, 27 Aug 2009 10:49:40 +0800
Vivek Goyal wrote:
...
> +static void update_min_vdisktime(struct io_service_tree *st)
> +{
> + u64 vdisktime;
> +
> + if (st->active_entity)
> + vdisktime = st->active_entity->vdisktime;
> +
> + if (st->rb_leftmost) {
> + struct io_entity *entity = rb_entry(st->rb_leftmost,
> + struct io_entity, rb_node);
> +
> + if (!st->active_entity)
> + vdisktime = entity->vdisktime;
> + else
> + vdisktime = min_vdisktime(vdisktime, entity->vdisktime);
> + }
> +
> + st->min_vdisktime = max_vdisktime(st->min_vdisktime, vdisktime);
> +}
block/elevator-fq.c: In function ‘elv_ioq_slice_expired’:
block/elevator-fq.c:132: warning: ‘vdisktime’ may be used uninitialized in this function
LD block/built-in.o
We'd better initialize vdisktime at first.
Signed-off-by: Gui Jianfeng <guijianfeng cn fujitsu com>
---
block/elevator-fq.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/block/elevator-fq.c b/block/elevator-fq.c
index d04e925..a4161c2 100644
--- a/block/elevator-fq.c
+++ b/block/elevator-fq.c
@@ -131,6 +131,8 @@ static void update_min_vdisktime(struct io_service_tree *st)
{
u64 vdisktime;
+ vdisktime = st->min_vdisktime;
+
if (st->active_entity)
vdisktime = st->active_entity->vdisktime;
--
1.5.4.rc3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]