Use process-specific name for dm devices.

If you're doing e.g. an i386 build an an x86_64 build at the same time,
you wind up deadlocking the dmsetup processes in sys_semtimedop()
because they have the same name between the two codepaths. This is
probbaly a dmsetup bug, but even if it weren't, you'd still have two
composes trying to use the same dm devices, and that's bad.  Instead,
stick the pid in the names.
This commit is contained in:
Peter Jones 2011-05-04 10:40:05 -04:00
parent 09a3d7a0e8
commit 59d298712d

View File

@ -689,7 +689,8 @@ class Lorax(BaseLoraxClass):
return None
# create dm device
dmdev = create_dm_dev("efiboot", disksize / 512, loopdev)
tablename = "efiboot%s" % (os.getpid(),)
dmdev = create_dm_dev(tablename, disksize / 512, loopdev)
if not dmdev:
remove_loop_dev(loopdev)