[PATCH] network: Introduce mutex for bridge name generation

Ján Tomko jtomko at redhat.com
Thu Jan 7 20:22:13 UTC 2021

On a Thursday in 2021, Laine Stump wrote:
>On 1/7/21 10:09 AM, Michal Privoznik wrote:
>>When defining/creating a network the bridge name may be filled in
>>automatically by libvirt (if none provided in the input XML or
>>the one provided is a pattern, e.g. "virbr%d"). During the
>>bridge name generation process a candidate name is generated
>>which is then checked with the rest of already defined/running
>>networks for collisions.
>>Problem is, that there is no mutex guarding this critical section
>>and thus if two threads line up so that they both generate the
>>same candidate they won't find any collision and the same name is
>>then stored.
>>Closes: https://gitlab.com/libvirt/libvirt/-/issues/78
>"Closes:"? I'm guessing other people have also been using this tag to 
>get gitlab to automatically close PRs and I just haven't noticed it 
>until now, but according to this page:
>"Resolves:" also works, and is a tag that has already been used quite 
>a bit in libvirt in the past.

Even for GitLab issues, Resolves is slightly winning at 7 vs 5.

>On the other hand, I've had some people tell me that they want just 
>the URL of the issue that was fixed, with no explicit tag (although 
>that was for bugzilla bugs)

Yes, I considered it nicer and less deceitful (because you're not really
claiming anything just by including the link), back then when I cared about things.

>Is it worth trying to pick one of these to always use, or is that just 
>pointless micromanagement?

Of course, that's what a mailing list is for.

>Or maybe there was already a discussion and 
>I just missed it... (I'm undecided whether I lean towards OCD, or 

As long as both people and machines can read it, either is fine.


>>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>Reviewed-by: Laine Stump <laine at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210107/c1025fd6/attachment-0001.sig>

More information about the libvir-list mailing list