[ovs-dev] [PATCH 13/14] ovsdb: Implement ovsdb-tool commands "compact" and "convert".

Ben Pfaff blp at nicira.com
Mon Feb 15 12:56:24 PST 2010


On Fri, Feb 12, 2010 at 06:47:33PM -0500, Jesse Gross wrote:
> On Fri, Feb 12, 2010 at 2:37 PM, Ben Pfaff <blp at nicira.com> wrote:
> >
> > +    /* Get (temporary) destination. */
> > +    if (in_place) {
> > +        dst_name = xasprintf("%s.tmp", src_name);
> > +    } else {
> > +        retval = lockfile_lock(src_name, INT_MAX, &src_lock);
> > +        if (retval) {
> > +            ovs_fatal(retval, "%s: failed to lock lockfile", src_name);
> > +        }
> > +    }
> >
> 
> Why do we only lock the source if it's not in place (as it isn't technically
> in place but still two different files)?

I had a reason, but I don't remember what it was and, more importantly,
it was wrong.

I changed the code to always lock both source and destination.




More information about the dev mailing list