# HG changeset patch
# User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
# Date 1207253245 14400
# Node ID dcf2ac998f1d1451ebbcd68c41ba317b345b01a8
# Parent c8c0e264c75cccccb40ff0de1cfdfc7a14c3d65a
Toks noticed we have some consistency issues in terms of MB versus KB for memory. This
should sort that out.
Signed-off-by: Jay Gagnon <grendel(a)linux.vnet.ibm.com>
diff -r c8c0e264c75c -r dcf2ac998f1d configure.ac
--- a/configure.ac Thu Mar 20 10:47:48 2008 -0700
+++ b/configure.ac Thu Apr 03 16:07:25 2008 -0400
@@ -61,9 +61,9 @@ AC_ARG_WITH([diskconfig],
[DEFINE_DISK_CONFIG(/tmp/diskpool.conf)]
)
AC_ARG_WITH([maxmem],
- [ --with-maxmem=FOO Set max memory (MB) for a guest.],
+ [ --with-maxmem=FOO Set max memory (KB) for a guest.],
[DEFINE_MAXMEM($with_maxmem)],
- [DEFINE_MAXMEM(4096)]
+ [DEFINE_MAXMEM(4194304)]
)
AC_ARG_WITH(html-dir,
diff -r c8c0e264c75c -r dcf2ac998f1d src/Virt_RASD.c
--- a/src/Virt_RASD.c Thu Mar 20 10:47:48 2008 -0700
+++ b/src/Virt_RASD.c Thu Apr 03 16:07:25 2008 -0400
@@ -344,7 +344,7 @@ static CMPIInstance *rasd_from_vdev(cons
(CMPIValue *)dev->dev.disk.type,
CMPI_chars);
} else if (dev->type == CIM_RES_TYPE_MEM) {
- const char *units = "MegaBytes";
+ const char *units = "KiloBytes";
CMSetProperty(inst, "AllocationUnits",
(CMPIValue *)units, CMPI_chars);
diff -r c8c0e264c75c -r dcf2ac998f1d src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Thu Mar 20 10:47:48 2008 -0700
+++ b/src/Virt_SettingsDefineCapabilities.c Thu Apr 03 16:07:25 2008 -0400
@@ -116,7 +116,7 @@ static struct sdc_rasd_prop *mem_max(con
struct sdc_rasd_prop tmp[] = {
{"InstanceID", (CMPIValue *)"Maximum", CMPI_chars},
- {"AllocationUnits", (CMPIValue *)"MegaBytes",
CMPI_chars},
+ {"AllocationUnits", (CMPIValue *)"KiloBytes",
CMPI_chars},
{"VirtualQuantity", (CMPIValue *)&max_vq, CMPI_uint64},
PROP_END
};
@@ -136,11 +136,11 @@ static struct sdc_rasd_prop *mem_min(con
{
bool ret;
struct sdc_rasd_prop *rasd = NULL;
- uint64_t min_vq = 64;
+ uint64_t min_vq = 64 << 10;
struct sdc_rasd_prop tmp[] = {
{"InstanceID", (CMPIValue *)"Minimum", CMPI_chars},
- {"AllocationUnits", (CMPIValue *)"MegaBytes",
CMPI_chars},
+ {"AllocationUnits", (CMPIValue *)"KiloBytes",
CMPI_chars},
{"VirtualQuantity", (CMPIValue *)&min_vq, CMPI_uint64},
PROP_END
};
@@ -160,11 +160,11 @@ static struct sdc_rasd_prop *mem_def(con
{
bool ret;
struct sdc_rasd_prop *rasd = NULL;
- uint64_t def_vq = 256;
+ uint64_t def_vq = 256 << 10;
struct sdc_rasd_prop tmp[] = {
{"InstanceID", (CMPIValue *)"Default", CMPI_chars},
- {"AllocationUnits", (CMPIValue *)"MegaBytes",
CMPI_chars},
+ {"AllocationUnits", (CMPIValue *)"KiloBytes",
CMPI_chars},
{"VirtualQuantity", (CMPIValue *)&def_vq, CMPI_uint64},
PROP_END
};
@@ -184,11 +184,11 @@ static struct sdc_rasd_prop *mem_inc(con
{
bool ret;
struct sdc_rasd_prop *rasd = NULL;
- uint64_t inc_vq = 1;
+ uint64_t inc_vq = 1 << 10;
struct sdc_rasd_prop tmp[] = {
{"InstanceID", (CMPIValue *)"Increment",
CMPI_chars},
- {"AllocationUnits", (CMPIValue *)"MegaBytes",
CMPI_chars},
+ {"AllocationUnits", (CMPIValue *)"KiloBytes",
CMPI_chars},
{"VirtualQuantity", (CMPIValue *)&inc_vq, CMPI_uint64},
PROP_END
};