xen: make sysfs files behave as their names suggest
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 29 Jan 2009 00:50:20 +0000 (16:50 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Feb 2009 21:47:16 +0000 (13:47 -0800)
commit06332b60cc1565fcc7d78a277007530842772a5c
treebf6850f2f6017a7c63f5c6509b0e3988075e69d0
parenta473fe79d2e74f0697969f003fe503c590376a2c
xen: make sysfs files behave as their names suggest

commit 618b2c8db24522ae273d8299c6a936ea13793c4d upstream.

1: make "target_kb" only accept and produce a memory size in kilobytes.
2: add a second "target" file which produces output in bytes, and will accept
   memparse input (scaled bytes)

This fixes the rather irritating problem that writing the same value
read back into target_kb would end up shrinking the domain by a factor
of 1024, with generally bad results.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: "dan.magenheimer@oracle.com" <dan.magenheimer@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/xen/balloon.c