|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Log the tdb_error when a read fails with EIO. This is ha
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 1be3cb670cf22b55b7bb49f7c8aec3e16fa6e28f
# Parent a63af74b1b6ee771db316a2a52ab0eaa4326da7f
Log the tdb_error when a read fails with EIO. This is happening after a long
time under load -- hopefully this message will suggest why.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
diff -r a63af74b1b6e -r 1be3cb670cf2 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c Wed Mar 8 22:57:46 2006
+++ b/tools/xenstore/xenstored_core.c Wed Mar 8 22:57:53 2006
@@ -404,16 +404,19 @@
TDB_DATA key, data;
uint32_t *p;
struct node *node;
+ TDB_CONTEXT * context = tdb_context(conn);
key.dptr = (void *)name;
key.dsize = strlen(name);
- data = tdb_fetch(tdb_context(conn), key);
+ data = tdb_fetch(context, key);
if (data.dptr == NULL) {
- if (tdb_error(tdb_context(conn)) == TDB_ERR_NOEXIST)
+ if (tdb_error(context) == TDB_ERR_NOEXIST)
errno = ENOENT;
- else
+ else {
+ log("TDB error on read: %s", tdb_errorstr(context));
errno = EIO;
+ }
return NULL;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
|
|
|
|