1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

6 Commits

Author SHA1 Message Date
David Disseldorp
1e83435eac printing: traverse_read the printer list for share updates
The printcap update procedure involves the background printer process
obtaining the printcap information from the printing backend, writing
this to printer_list.tdb, and then notifying all smbd processes of the
new list. The processes then all attempt to simultaneously traverse
printer_list.tdb, in order to update their local share lists.

With a large number of printers, and a large number of per-client smbd
processes, this traversal results in significant lock contention, mostly
due to the fact that the traversal is unnecessarily done with an
exclusive (write) lock on the printer_list.tdb database.

This commit changes the share update code path to perform a read-only
traversal.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Reported-by: Alex K <korobkin+samba@gmail.com>
Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-08 14:10:38 +02:00
Günther Deschner
854467851d s3-printing: Get the location info from cups.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-05-16 12:54:33 +02:00
David Disseldorp
3e61c97a7e s3-printing: remove printer_list_need_refresh
printer_list_need_refresh() was used previously to ensure one smbd
process did not attempt to update the printer_list tdb during or soon
after update by another smbd.

It is no longer needed, as pcap updates are now only performed by the
parent smbd process following startup, SIGHUP, config update or printcap
cache time expiry.
2011-01-07 15:37:39 -08:00
Andreas Schneider
65bd8f881d s3-printing: Document the printer list functions. 2010-09-15 12:53:40 +02:00
Simo Sorce
25a2d94974 s3-printing: Add method to skip refresh if just happned.
This way if multiple process try to refresh at the same time we don't do it
over and over again.

Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:40 +02:00
Simo Sorce
d2a027ea94 s3-printing: Added a printer list database.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:40 +02:00