CVS update: samba/source/locking

Jeremy Allison jra at samba.org
Fri Nov 30 12:58:50 EST 2001


Date:	Thu Nov 29 17:58:50 2001
Author:	jra

Update of /data/cvs/samba/source/locking
In directory va:/tmp/cvs-serv5969/locking

Modified Files:
      Tag: SAMBA_2_2
	locking.c 
Log Message:
After conversations with Andrew, improved the robustness of the
sharemode db in the following way.

Originally, on startup and shutdown, smbd would scan the share mode
db to ensure it was correct. This lead to scalability issues as
scans lock the db for quite a long time. Andrew had the brainstorm
that we only care about the record we're about to read.

This new code (small change really, but quite significant) causes
get_share_modes() to do a process_exists() call against each pid
in each record, and to delete any that don't and re-write the
entry if any dead records were detected.

This allowed me to remove the startup/shutdown scans of the
db (they can be added into smbstatus if anyone really cares to
have them back). This will please the vfs author who was worried
about the time taken on open() calls, and will lead to much
greater robustness and scalability in the share mode db.

We need much testing of this, and also netbench tests to
ensure the extra process_exists() calls don't hurt performance
(they shouldn't it's a very simple system call).

Jeremy.


Revisions:
locking.c		1.93.2.27 => 1.93.2.28
	http://www.samba.org/cgi-bin/cvsweb/samba/source/locking/locking.c?r1=1.93.2.27&r2=1.93.2.28




More information about the samba-cvs mailing list