1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00

r15446: Tidy up the formatting of locking debug messages and make it more

consistent. Bring oplocks withing the purview of the locking debug
channel.
This commit is contained in:
James Peach
2006-05-05 02:06:37 +00:00
committed by Gerald (Jerry) Carter
parent 755c272ebf
commit e817cfd7d3
4 changed files with 28 additions and 20 deletions

View File

@@ -1948,7 +1948,8 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
SMB_STRUCT_FLOCK lock;
int ret;
DEBUG(8,("fcntl_lock %d %d %.0f %.0f %d\n",fd,op,(double)offset,(double)count,type));
DEBUG(8,("fcntl_lock fd=%d op=%d offset=%.0f count=%.0f type=%d\n",
fd,op,(double)offset,(double)count,type));
lock.l_type = type;
lock.l_whence = SEEK_SET;
@@ -1982,7 +1983,8 @@ BOOL fcntl_getlock(int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pi
SMB_STRUCT_FLOCK lock;
int ret;
DEBUG(8,("fcntl_getlock %d %.0f %.0f %d\n",fd,(double)*poffset,(double)*pcount,*ptype));
DEBUG(8,("fcntl_getlock fd=%d offset=%.0f count=%.0f type=%d\n",
fd,(double)*poffset,(double)*pcount,*ptype));
lock.l_type = *ptype;
lock.l_whence = SEEK_SET;

View File

@@ -20,6 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define DBGC_CLASS DBGC_LOCKING
#include "includes.h"
/* Current number of oplocks we have outstanding. */
@@ -118,10 +119,11 @@ BOOL set_file_oplock(files_struct *fsp, int oplock_type)
exclusive_oplocks_open++;
}
DEBUG(5,("set_file_oplock: granted oplock on file %s, dev = %x, inode = %.0f, file_id = %lu, \
tv_sec = %x, tv_usec = %x\n",
fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode, fsp->file_id,
(int)fsp->open_time.tv_sec, (int)fsp->open_time.tv_usec ));
DEBUG(5,("set_file_oplock: granted oplock on file %s, 0x%x/%.0f/%lu, "
"tv_sec = %x, tv_usec = %x\n",
fsp->fsp_name, (unsigned int)fsp->dev, (double)fsp->inode,
fsp->file_id, (int)fsp->open_time.tv_sec,
(int)fsp->open_time.tv_usec ));
return True;
}
@@ -191,7 +193,7 @@ BOOL remove_oplock(files_struct *fsp)
ret = remove_share_oplock(lck, fsp);
if (!ret) {
DEBUG(0,("remove_oplock: failed to remove share oplock for "
"file %s fnum %d, dev = %x, inode = %.0f\n",
"file %s fnum %d, 0x%x/%.0f\n",
fsp->fsp_name, fsp->fnum, (unsigned int)dev,
(double)inode));
}
@@ -292,8 +294,8 @@ static files_struct *initial_break_processing(SMB_DEV_T dev, SMB_INO_T inode, un
files_struct *fsp = NULL;
if( DEBUGLVL( 3 ) ) {
dbgtext( "initial_break_processing: called for dev = 0x%x, inode = %.0f file_id = %lu\n",
(unsigned int)dev, (double)inode, file_id);
dbgtext( "initial_break_processing: called for 0x%x/%.0f/%u\n",
(unsigned int)dev, (double)inode, (int)file_id);
dbgtext( "Current oplocks_open (exclusive = %d, levelII = %d)\n",
exclusive_oplocks_open, level_II_oplocks_open );
}
@@ -403,9 +405,9 @@ static void process_oplock_async_level2_break_message(int msg_type, struct proce
/* De-linearize incoming message. */
message_to_share_mode_entry(&msg, buf);
DEBUG(10, ("Got oplock async level 2 break message from pid %d: 0x%x/%.0f/%d\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev, (double)msg.inode,
(int)msg.share_file_id));
DEBUG(10, ("Got oplock async level 2 break message from pid %d: 0x%x/%.0f/%lu\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev,
(double)msg.inode, msg.share_file_id));
fsp = initial_break_processing(msg.dev, msg.inode,
msg.share_file_id);
@@ -490,9 +492,9 @@ static void process_oplock_break_message(int msg_type, struct process_id src,
/* De-linearize incoming message. */
message_to_share_mode_entry(&msg, buf);
DEBUG(10, ("Got oplock break message from pid %d: 0x%x/%.0f/%d\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev, (double)msg.inode,
(int)msg.share_file_id));
DEBUG(10, ("Got oplock break message from pid %d: 0x%x/%.0f/%lu\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev,
(double)msg.inode, msg.share_file_id));
fsp = initial_break_processing(msg.dev, msg.inode,
msg.share_file_id);
@@ -693,9 +695,10 @@ static void process_oplock_break_response(int msg_type, struct process_id src,
/* De-linearize incoming message. */
message_to_share_mode_entry(&msg, buf);
DEBUG(10, ("Got oplock break response from pid %d: 0x%x/%.0f/%u mid %u\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev, (double)msg.inode,
(unsigned int)msg.share_file_id, (unsigned int)msg.op_mid));
DEBUG(10, ("Got oplock break response from pid %d: 0x%x/%.0f/%lu mid %u\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev,
(double)msg.inode, 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);
@@ -719,8 +722,9 @@ static void process_open_retry_message(int msg_type, struct process_id src,
/* De-linearize incoming message. */
message_to_share_mode_entry(&msg, buf);
DEBUG(10, ("Got open retry msg from pid %d: 0x%x/%.0f mid %u\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev, (double)msg.inode,
DEBUG(10, ("Got open retry msg from pid %d: 0x%x/%.0f/%lu mid %u\n",
(int)procid_to_pid(&src), (unsigned int)msg.dev,
(double)msg.inode, msg.share_file_id,
(unsigned int)msg.op_mid));
schedule_deferred_open_smb_message(msg.op_mid);

View File

@@ -18,6 +18,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define DBGC_CLASS DBGC_LOCKING
#include "includes.h"
#if HAVE_KERNEL_OPLOCKS_IRIX

View File

@@ -18,6 +18,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define DBGC_CLASS DBGC_LOCKING
#include "includes.h"
#if HAVE_KERNEL_OPLOCKS_LINUX