From 1c6a55b04c418106cf2be5156fa8e53b1adaa1b4 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Wed, 25 Nov 2009 02:19:31 +0000 Subject: protocol/client: Make log message print both generation number and inode number. Signed-off-by: Vikas Gorur Signed-off-by: Anand V. Avati BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315 --- xlators/protocol/client/src/client-protocol.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c index c33e301e00b..bee6424cd93 100644 --- a/xlators/protocol/client/src/client-protocol.c +++ b/xlators/protocol/client/src/client-protocol.c @@ -4881,11 +4881,12 @@ client_lookup_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen, gf_log (frame->this->name, GF_LOG_DEBUG, "LOOKUP %"PRId64"/%s (%s): " "inode number changed from " - "%"PRId64" to %"PRId64, - local->loc.parent->ino, + "{%"PRId64",%"PRId64"} to {%"PRId64",%"PRId64"}", + local->loc.parent ? + local->loc.parent->ino : (uint64_t) 0, local->loc.name, local->loc.path, - oldino, stbuf.st_ino); + oldgen, oldino, stbuf.st_dev, stbuf.st_ino); goto fail; } @@ -4896,7 +4897,8 @@ client_lookup_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen, "LOOKUP %"PRId64"/%s (%s) : " "failed to set remote inode " "number to inode ctx", - local->loc.parent->ino, + local->loc.parent ? + local->loc.parent->ino : (uint64_t) 0, local->loc.name, local->loc.path); } -- cgit