[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Log the tdb_error when a read fails with EIO. This is happening after a long



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 5aae1b1c30980fe704e723926db1f4e527e03f32
# Parent  8853631252d828c0205e4e89c2bc521aa1f34934
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 8853631252d8 -r 5aae1b1c3098 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Sat Mar  4 18:10:56 2006
+++ b/tools/xenstore/xenstored_core.c   Sat Mar  4 18:12:37 2006
@@ -406,16 +406,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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.