diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-03 14:03:43 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-04-17 10:06:24 +0200 |
commit | 9159045951d33ae0f3e7b355a1ade5aabb0dbf72 (patch) | |
tree | 63d94bb27b86e9dabeec84c08980049b525b4118 | |
parent | 9ff316ea2fb927d46878cdae4d9fa0d7a3e9fe77 (diff) | |
download | samba-9159045951d33ae0f3e7b355a1ade5aabb0dbf72.tar.gz samba-9159045951d33ae0f3e7b355a1ade5aabb0dbf72.tar.xz samba-9159045951d33ae0f3e7b355a1ade5aabb0dbf72.zip |
Use procid_str in debug messages for better cluster-debuggability
(cherry picked from commit 4955e1610af3086cc7e8d0344313a124b23a4e31)
-rw-r--r-- | source/locking/brlock.c | 4 | ||||
-rw-r--r-- | source/smbd/oplock.c | 24 |
2 files changed, 15 insertions, 13 deletions
diff --git a/source/locking/brlock.c b/source/locking/brlock.c index 032aaa56b61..cd9a203cc12 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -41,11 +41,11 @@ static struct db_context *brlock_db; static void print_lock_struct(unsigned int i, struct lock_struct *pls) { - DEBUG(10,("[%u]: smbpid = %u, tid = %u, pid = %u, ", + DEBUG(10,("[%u]: smbpid = %u, tid = %u, pid = %s, ", i, (unsigned int)pls->context.smbpid, (unsigned int)pls->context.tid, - (unsigned int)procid_to_pid(&pls->context.pid) )); + procid_str(debug_ctx(), &pls->context.pid) )); DEBUG(10,("start = %.0f, size = %.0f, fnum = %d, %s %s\n", (double)pls->start, diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c index 37747c728ac..63120f53838 100644 --- a/source/smbd/oplock.c +++ b/source/smbd/oplock.c @@ -412,8 +412,9 @@ static void process_oplock_async_level2_break_message(struct messaging_context * /* De-linearize incoming message. */ message_to_share_mode_entry(&msg, (char *)data->data); - DEBUG(10, ("Got oplock async level 2 break message from pid %d: %s/%lu\n", - (int)procid_to_pid(&src), file_id_string_tos(&msg.id), msg.share_file_id)); + DEBUG(10, ("Got oplock async level 2 break message from pid %s: " + "%s/%lu\n", procid_str(debug_ctx(), &src), + file_id_string_tos(&msg.id), msg.share_file_id)); fsp = initial_break_processing(msg.id, msg.share_file_id); @@ -507,8 +508,9 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx, /* De-linearize incoming message. */ message_to_share_mode_entry(&msg, (char *)data->data); - DEBUG(10, ("Got oplock break message from pid %d: %s/%lu\n", - (int)procid_to_pid(&src), file_id_string_tos(&msg.id), msg.share_file_id)); + DEBUG(10, ("Got oplock break message from pid %s: %s/%lu\n", + procid_str(debug_ctx(), &src), file_id_string_tos(&msg.id), + msg.share_file_id)); fsp = initial_break_processing(msg.id, msg.share_file_id); @@ -621,8 +623,8 @@ static void process_kernel_oplock_break(struct messaging_context *msg_ctx, pull_file_id_16((char *)data->data, &id); file_id = (unsigned long)IVAL(data->data, 16); - DEBUG(10, ("Got kernel oplock break message from pid %d: %s/%u\n", - (int)procid_to_pid(&src), file_id_string_tos(&id), + DEBUG(10, ("Got kernel oplock break message from pid %s: %s/%u\n", + procid_str(debug_ctx(), &src), file_id_string_tos(&id), (unsigned int)file_id)); fsp = initial_break_processing(id, file_id); @@ -713,9 +715,9 @@ static void process_oplock_break_response(struct messaging_context *msg_ctx, /* De-linearize incoming message. */ message_to_share_mode_entry(&msg, (char *)data->data); - DEBUG(10, ("Got oplock break response from pid %d: %s/%lu mid %u\n", - (int)procid_to_pid(&src), file_id_string_tos(&msg.id), msg.share_file_id, - (unsigned int)msg.op_mid)); + DEBUG(10, ("Got oplock break response from pid %s: %s/%lu mid %u\n", + procid_str(debug_ctx(), &src), file_id_string_tos(&msg.id), + msg.share_file_id, (unsigned int)msg.op_mid)); /* Here's the hack from open.c, store the mid in the 'port' field */ schedule_deferred_open_smb_message(msg.op_mid); @@ -742,8 +744,8 @@ static void process_open_retry_message(struct messaging_context *msg_ctx, /* De-linearize incoming message. */ message_to_share_mode_entry(&msg, (char *)data->data); - DEBUG(10, ("Got open retry msg from pid %d: %s mid %u\n", - (int)procid_to_pid(&src), file_id_string_tos(&msg.id), + DEBUG(10, ("Got open retry msg from pid %s: %s mid %u\n", + procid_str(debug_ctx(), &src), file_id_string_tos(&msg.id), (unsigned int)msg.op_mid)); schedule_deferred_open_smb_message(msg.op_mid); |