[PATCHES] idmap autorid fixes

Jeremy Allison jra at samba.org
Wed Apr 2 13:07:34 MDT 2014


On Tue, Apr 01, 2014 at 01:19:32PM +0200, Michael Adam wrote:
> Hi,
> 
> attached find  three sets of patches for the autorid idmap code
> for master. Theses should be applied in the oder of the naming.
> Also available from my master-autorid branch:
> 
> https://git.samba.org/?p=obnox/samba/samba-obnox.git;a=shortlog;h=master-autorid
> 
> 
> 1. The first patchset fixes a race condition in the db
>    initialization code that can lead to a corrupted database
>    where the range HWM key is reset to zero after it has been
>    bumped once or more (especially in a cluster).
>    The problem was that while initializing the HWM key in
>    a transaction we did not refetch the current value
>    inside the transaction, so after checking outside and
>    starting the transaction, it might have been created and
>    modified by another process...
>    This is sort of the minimal patch to fix this issue
>    by rechecking the HWM value inside the transaction.
> 2. The second patchset improves debugging and introduces
>    a check for a modified HWM key into the code that acqures
>    a new range. This will also catch externally modified
>    HWM keys, and hence prevent overwriting ranges.
> 3. The third patchset makes the fix for #1 more complete
>    by wrapping the whole action of the initialization code
>    into one big transaction, thereby making the whole
>    initialization atomic.
> 
> There is no bug report yet for this issue.
> We need one for 4.1 and 4.0 (at least).
> Since the patches do not apply to those versions,
> I think I will have to create a special port of the
> minimal fix (#1).
> 
> In the meantime review & pushe for these master-patches would be
> welcome...

Really nice work, thanks ! Pushed to autobuild.

I'll let you create the bug report and do the
back-port for 4.0.x and 4.1.x :-).

Cheers,

Jeremy.


More information about the samba-technical mailing list