serverid patchset ?

Jeremy Allison jra at samba.org
Tue May 22 09:47:38 MDT 2012


On Tue, May 22, 2012 at 04:18:54PM +0200, Stefan (metze) Metzmacher wrote:
> 
> I think we found the problem with DELETE_PENDING.
> 
> The code in open_mode_check() looks like this:
> 
>         int i;
> 
>         if(lck->data->num_share_modes == 0) {
>                 return NT_STATUS_OK;
>         }
> 
>         *file_existed = True;
> 
>         /* A delete on close prohibits everything */
> 
>         if (is_delete_on_close_set(lck, name_hash)) {
>                 return NT_STATUS_DELETE_PENDING;
>         }
> 
> Before parse_share_modes() cleaned up stale share mode entries,
> as result lck->data->num_share_modes is 0 and we can return NT_STATUS_OK.
> 
> Now without the cleanup lck->data->num_share_modes can be > 0,
> which can result in NT_STATUS_DELETE_PENDING, as is_delete_on_close_set()
> doesn't verify anything.
> 
> If we still have a delete_token, but no valid share_modes we need to
> delete the file.
> 
> But the current code just returns OK and doesn't touch *file_existed,
> I think in order to get this patches in it's enough to provide the same
> behavior as before.
> 
> It's still strange why we trigger this behavior from autobuild,
> as all processes should cleanup correctly.
> 
> For testing we should add a DEBUG(0,) and print all cleanups of
> non-existing processes and see how often an autobuild triggers this
> and when.

Very cool metze ! Glad you found that. I'll try adding
a fix on top of vl's patchset and if I get it working
post back to the list for review.

Thanks,

	Jeremy.


More information about the samba-technical mailing list