WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Log the tdb_error when a read fails with EIO. This is happening after a long
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 04 Mar 2006 19:32:07 +0000
Delivery-date: Sat, 04 Mar 2006 19:32:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>