[PATCH] notifyd

Jeremy Allison jra at samba.org
Tue Jul 7 19:02:47 UTC 2015


On Tue, Jul 07, 2015 at 02:10:03PM +0200, Volker Lendecke wrote:
> On Mon, Jul 06, 2015 at 01:51:30PM -0700, Jeremy Allison wrote:
> > On Fri, Jun 19, 2015 at 01:36:23PM +0200, Volker Lendecke wrote:
> > > Hi!
> > > 
> > > Attached find the latest incarnation of the notifyd I've
> > > been talking about for a while now. Survived a few private
> > > autobuilds.
> > > 
> > > Review appreciated!
> > 
> > Only issue I've found so far.
> 
> ... Wow, you've really looked at the code. Thanks!!
> 
> > notifyd_apply_reclog() call call TALLOC_FREE on state->peers[i],
> > and in the destructor it will swap out the entry for
> > state->peers[i] with state->peers[i] = state->peers[state->num_peers-1];
> > 
> > That means in the log index does not match case we will
> > set state->peers[i]->last_broadcast = time(NULL) incorrectly,
> > as the last broadcast time of the deleted record.
> > 
> > I think the correct fix is to change notifyd_apply_reclog()
> > to return a bool, and just 'continue' the for loop if
> > it returns false.
> > 
> > Can you confirm this problem (it's complex code :-) ?
> 
> Of course, fully correct. I'd solve it slighty differently: Just assign
> the last_broadcast in apply_reclog.
> 
> > If so, do you want me to do the fix or do you want
> > to post another version ?
> 
> Attached find two files: One with the changes just for review, and one
> with the full new version.

Pushed with minor change to "smbd: Remove SMB_VFS_NOTIFY_WATCH" commit
to add version number comment /* Version 33 - Remove notify_watch_fn */
to source3/include/vfs.h.

W00t! Amazing work, now in for 4.3.0 !!!!!

Thanks,

Jeremy.


More information about the samba-technical mailing list