On Tue, Mar 05, 2013 at 05:59:32PM +0000, Zoltan Kiss wrote:These values shouldn't be negative, but after an overflow their value
can turn into negative, if they are signed. xentop can show bogus
values in this case.
I get this during compilation:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c: In function âshow_oo_reqâ:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c:233: warning: format â%dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c: In function âshow_rd_reqâ:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c:234: warning: format â%dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c: In function âshow_wr_reqâ:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c:235: warning: format â%dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c: In function âshow_f_reqâ:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c:236: warning: format â%dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c: In function âshow_ds_reqâ:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c:237: warning: format â%dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c: In function âshow_rd_sectâ:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c:238: warning: format â%dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c: In function âshow_wr_sectâ:
/home/konrad/linux/drivers/block/xen-blkback/xenbus.c:239: warning: format â%dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
CC block/bsg-lib.o
CC mm/dmapool.o
CC kernel/debug/debug_core.o
CC mm/hugetlb.o
CC mm/mempolicy.o
CC drivers/acpi/sleep.o
/home/konrad/linux/drivers/block/xen-blkback/blkback.c: In function âprint_statsâ:
/home/konrad/linux/drivers/block/xen-blkback/blkback.c:384: warning: format â%3dâ expects type âintâ, but argument 3 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/blkback.c:384: warning: format â%4dâ expects type âintâ, but argument 4 has type âlong long unsigned intâ
/home/konrad/linux/drivers/block/xen-blkback/blkback.c:384: warning: format â%4dâ expects type âintâ, but argument 5 has type âlo
Could you fix it up please as one big patch if possible?
Signed-off-by: Zoltan Kiss <zoltan.kiss@xxxxxxxxxx>
Reported-by: Ichiro Ogino <ichiro.ogino@xxxxxxxxxxxx>
---
drivers/block/xen-blkback/common.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h
index 6072390..72d09ac 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -208,13 +208,13 @@ struct xen_blkif {
/* statistics */
unsigned long st_print;
- int st_rd_req;
- int st_wr_req;
- int st_oo_req;
- int st_f_req;
- int st_ds_req;
- int st_rd_sect;
- int st_wr_sect;
+ unsigned long long st_rd_req;
+ unsigned long long st_wr_req;
+ unsigned long long st_oo_req;
+ unsigned long long st_f_req;
+ unsigned long long st_ds_req;
+ unsigned long long st_rd_sect;
+ unsigned long long st_wr_sect;
wait_queue_head_t waiting_to_free;
};
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/