[SSSD] Atomic |rename()| ... / was: Re: [PATCH] https://fedorahosted.org/sssd/ticket/2410

Roland Mainz rmainz at redhat.com
Tue Aug 26 11:05:17 UTC 2014



----- Original Message -----
> From: "Sumit Bose" <sbose at redhat.com>
> To: sssd-devel at lists.fedorahosted.org
> Sent: Tuesday, August 26, 2014 12:06:53 PM
> Subject: Re: [SSSD] [PATCH] https://fedorahosted.org/sssd/ticket/2410
> 
> On Tue, Aug 26, 2014 at 10:46:59AM +0200, Jakub Hrozek wrote:
> > On Fri, Aug 22, 2014 at 05:24:46PM +0200, Jakub Hrozek wrote:
> > > On Fri, Aug 22, 2014 at 05:21:11PM +0200, Pavel Březina wrote:
> > > > 2) the ccache name is stored in KRB5CCACHE (or something like that)
> > > > environment variable so actually only one ccache may be used. Possible
> > > > solution would be to create two files and than keep only one of them.
> > > 
> > > If I understood Sumit on the call yesterday, his proposal was to create
> > > a randomized name, but then rename it to a predictable name. Would that
> > > solve the problem?
> > 
> > Hi,
> > 
> > in my testing (using a test that our QE colleagues kindly provided), the
> > attached patch solves the problem as well and in my opinion is a bit
> > more lightweight.
> 
> I like your approach better and do not expect any issues since rename()
> is expected to be atomic.
> 
> Please find comments below.

Erm... |rename(src, dest)| with |src| and |dest| in the same directory can be considered an atomic operation... beyond that you're up to the mercy of the filesystem implementation.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) rmainz at redhat.com
  \__\/\/__/  IPA/Kerberos5 team
  /O /==\ O\  
 (;O/ \/ \O;)
 



More information about the sssd-devel mailing list