[Patch] Stop smbprofile.tdb from growing when level is set to 0

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jan 9 17:31:02 UTC 2019

On Wed, Jan 09, 2019 at 03:24:28PM +0000, Dylan Stephano-Shachter wrote:
> How does this look?
> Sorry wrong patch here is the correct one

Better, thanks.

I'm sorry, in the first round I just took a brief look and saw the
easy formal things I wanted to comment on. Now for the "real"

The first hunk in smbprofile_dump can be changed: I think you could do
an early return from the function if both variables are false. You
could save the getrusage and the other tdb calls if there's nothing to
store. I haven't tested that version, but I don't see why we should
look at tdb at all.

I think we should be able to just discard the second hunk.
smbprofile_cleanup only ever writes into one record, and I think we
should keep that logic untouched. It might be the case that the parent
smbd (or rather the cleanupd for that matter) has different profiling
settings than the children. The cleanupd does not contribute to
profiling itself at all, but it should still collect everything from
the smbds that have exited.

What do you think?


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: 0551-370000-0, mailto:kontakt at sernet.de
Gesch.F.: Dr. Johannes Loxen und Reinhild Jung
AG Göttingen: HR-B 2816 - http://www.sernet.de

More information about the samba-technical mailing list