[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Mon Oct 1 12:29:02 MDT 2012


The branch, master has been updated
       via  aa6a7a9 s3fs-smbd: Move housekeeping to the background process.
      from  8da8a22 s3: vfs_streams_depot: add delete_lost option

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit aa6a7a97803b1106d2200c889a2260f81059c450
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Sep 27 19:01:15 2012 +0200

    s3fs-smbd: Move housekeeping to the background process.
    
    If you add 200 printers using lpadmin. Then you wait for the printcap
    cache to expire. As soon as this expires we notify all deamons that they
    should reload the printers. This mean we need to create the default
    registry keys for each printer. If you do e.g. a 'smbclient -L' during
    that time you will get a lot of timeouts.
    
    This lets the housekeeping function of the printcap cache do the task of
    creating the default registry keys in background queue process. When it is done
    with the task it will tell all smbd childs to reload the printers and the 200
    printers appear.
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Mon Oct  1 20:28:23 CEST 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source3/printing/queue_process.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index cf3becd..3d142dd 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -41,6 +41,15 @@ extern pid_t start_spoolssd(struct event_context *ev_ctx,
 static void reload_pcap_change_notify(struct tevent_context *ev,
 			       struct messaging_context *msg_ctx)
 {
+	/*
+	 * Reload the printers first in the background process so that
+	 * newly added printers get default values created in the registry.
+	 *
+	 * This will block the process for some time (~1 sec per printer), but
+	 * it doesn't block smbd's servering clients.
+	 */
+	delete_and_reload_printers(ev, msg_ctx);
+
 	message_send_all(msg_ctx, MSG_PRINTER_PCAP, NULL, 0, NULL);
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list