svn commit: samba r15446 - branches/SAMBA_3_0/source/lib
branches/SAMBA_3_0/source/smbd trunk/source/lib trunk/source/smbd
jpeach at samba.org
jpeach at samba.org
Fri May 5 02:06:39 GMT 2006
Author: jpeach
Date: 2006-05-05 02:06:37 +0000 (Fri, 05 May 2006)
New Revision: 15446
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15446
Log:
Tidy up the formatting of locking debug messages and make it more
consistent. Bring oplocks withing the purview of the locking debug
channel.
Modified:
branches/SAMBA_3_0/source/lib/util.c
branches/SAMBA_3_0/source/smbd/oplock.c
branches/SAMBA_3_0/source/smbd/oplock_irix.c
branches/SAMBA_3_0/source/smbd/oplock_linux.c
trunk/source/lib/util.c
trunk/source/smbd/oplock.c
trunk/source/smbd/oplock_irix.c
trunk/source/smbd/oplock_linux.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ branches/SAMBA_3_0/source/lib/util.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -1948,7 +1948,8 @@
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 @@
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;
Modified: branches/SAMBA_3_0/source/smbd/oplock.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/oplock.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ branches/SAMBA_3_0/source/smbd/oplock.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -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 @@
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 @@
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 @@
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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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);
Modified: branches/SAMBA_3_0/source/smbd/oplock_irix.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/oplock_irix.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ branches/SAMBA_3_0/source/smbd/oplock_irix.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -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
Modified: branches/SAMBA_3_0/source/smbd/oplock_linux.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/oplock_linux.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ branches/SAMBA_3_0/source/smbd/oplock_linux.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -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
Modified: trunk/source/lib/util.c
===================================================================
--- trunk/source/lib/util.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ trunk/source/lib/util.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -1948,7 +1948,8 @@
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 @@
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;
Modified: trunk/source/smbd/oplock.c
===================================================================
--- trunk/source/smbd/oplock.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ trunk/source/smbd/oplock.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -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 @@
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 @@
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 @@
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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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);
Modified: trunk/source/smbd/oplock_irix.c
===================================================================
--- trunk/source/smbd/oplock_irix.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ trunk/source/smbd/oplock_irix.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -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
Modified: trunk/source/smbd/oplock_linux.c
===================================================================
--- trunk/source/smbd/oplock_linux.c 2006-05-04 19:24:24 UTC (rev 15445)
+++ trunk/source/smbd/oplock_linux.c 2006-05-05 02:06:37 UTC (rev 15446)
@@ -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
More information about the samba-cvs
mailing list