summaryrefslogtreecommitdiffstats
path: root/source/locking/locking.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-20 19:28:37 +0000
committerJeremy Allison <jra@samba.org>1998-08-20 19:28:37 +0000
commite1dd03ecda0bc6d7eaa31070c83774bb5679fd1b (patch)
treefb9fca37fd465bbc7f7deabf8f850c62cf855a76 /source/locking/locking.c
parent10303a78d4b12a03166db89202759cd745c516c5 (diff)
downloadsamba-e1dd03ecda0bc6d7eaa31070c83774bb5679fd1b.tar.gz
samba-e1dd03ecda0bc6d7eaa31070c83774bb5679fd1b.tar.xz
samba-e1dd03ecda0bc6d7eaa31070c83774bb5679fd1b.zip
Turning on blocking locking code. NB. Blocking lock requests that are not
the head of an SMB request (ie. are part of a chain) will not be queued - this will be fixed when we move to the new chain code. In practice, this doesn't seem to cause much of a problem (in my admittedly limited testing) bug a debug level zero message will be placed in the log when this happens to help determine how real the problem is. smbd/locking.c: New debug messages. smbd/blocking.c: New blocking code - handles SMBlock, SMBlockread and SMBlockingX smbd/chgpasswd.c: Fix for master fd leak. smbd/files.c: Tidyup comment. smbd/nttrans.c: Added fnum to debug message. smbd/process.c: Made chain_reply() use construct_reply_common(). Added blocking lock queue processing into idle loop. smbd/reply.c: Added queue pushes for SMBlock, SMBlockread and SMBlockingX. Jeremy.
Diffstat (limited to 'source/locking/locking.c')
-rw-r--r--source/locking/locking.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c
index f5e27317b5c..4f2c9ab3458 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -109,6 +109,9 @@ BOOL do_lock(files_struct *fsp,connection_struct *conn,
return False;
}
+ DEBUG(10,("do_lock: lock type %d start=%d len=%d requested for file %s\n",
+ lock_type, (int)offset, (int)count, fsp->fsp_name ));
+
if (OPEN_FSP(fsp) && fsp->can_lock && (fsp->conn == conn))
ok = fcntl_lock(fsp->fd_ptr->fd,F_SETLK,offset,count,
map_lock_type(fsp,lock_type));
@@ -133,6 +136,9 @@ BOOL do_unlock(files_struct *fsp,connection_struct *conn,
if (!lp_locking(SNUM(conn)))
return(True);
+ DEBUG(10,("do_unlock: unlock start=%d len=%d requested for file %s\n",
+ (int)offset, (int)count, fsp->fsp_name ));
+
if (OPEN_FSP(fsp) && fsp->can_lock && (fsp->conn == conn))
ok = fcntl_lock(fsp->fd_ptr->fd,F_SETLK,offset,count,F_UNLCK);