ia64/xen-unstable
changeset 16241:01d45050a808
qemu: Add extra tracing around logdirty bitmap setup.
Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
author | Keir Fraser <keir@xensource.com> |
---|---|
date | Thu Oct 25 15:04:33 2007 +0100 (2007-10-25) |
parents | e4cd41c5c4e8 |
children | 3d97c1c1f7c8 |
files | tools/ioemu/xenstore.c |
line diff
1.1 --- a/tools/ioemu/xenstore.c Thu Oct 25 15:01:59 2007 +0100 1.2 +++ b/tools/ioemu/xenstore.c Thu Oct 25 15:04:33 2007 +0100 1.3 @@ -303,12 +303,19 @@ void xenstore_process_logdirty_event(voi 1.4 logdirty_bitmap_size *= sizeof (unsigned long); /* bytes */ 1.5 1.6 /* Map the shared-memory segment */ 1.7 - if ((shmid = shmget(key, 1.8 - 2 * logdirty_bitmap_size, 1.9 - S_IRUSR|S_IWUSR)) == -1 1.10 - || (seg = shmat(shmid, NULL, 0)) == (void *)-1) { 1.11 - fprintf(logfile, "Log-dirty: can't map segment %16.16llx (%s)\n", 1.12 - (unsigned long long) key, strerror(errno)); 1.13 + fprintf(logfile, "%s: key=%16.16llx size=%d\n", __FUNCTION__, 1.14 + (unsigned long long)key, logdirty_bitmap_size); 1.15 + shmid = shmget(key, 2 * logdirty_bitmap_size, S_IRUSR|S_IWUSR); 1.16 + if (shmid == -1) { 1.17 + fprintf(logfile, "Log-dirty: shmget failed: segment %16.16llx " 1.18 + "(%s)\n", (unsigned long long)key, strerror(errno)); 1.19 + exit(1); 1.20 + } 1.21 + 1.22 + seg = shmat(shmid, NULL, 0); 1.23 + if (seg == (void *)-1) { 1.24 + fprintf(logfile, "Log-dirty: shmat failed: segment %16.16llx " 1.25 + "(%s)\n", (unsigned long long)key, strerror(errno)); 1.26 exit(1); 1.27 } 1.28