]> sourceware.org Git - lvm2.git/commit
Add random suffix to archive file names to prevent races when being created.
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 9 Sep 2010 13:13:12 +0000 (13:13 +0000)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 9 Sep 2010 13:13:12 +0000 (13:13 +0000)
commitdc1bc980d07ef2b230e6741ce7fe6fca97ce9f18
treee914709ad92005616d502a761b014f31916300a1
parent3d3ae02e626e01829803665cff2c46460a10301d
Add random suffix to archive file names to prevent races when being created.

In certain configurations, we're not under a VG rw lock while trying to write
a new archive file with VG metadata. A common example is using "vgs" while
having the content of backup and archive directories empty. The code scans the
content of these directories and tries to determine the final index that should
be used in archive name. Since we're not under a lock, we can get into a race
while choosing the index which could end up showing errors about not being able
to rename to final archive name. Let's add random number suffix to these archive
file names so we can avoid the race.
WHATS_NEW
lib/format_text/archive.c
This page took 0.038367 seconds and 5 git commands to generate.