]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: use separate lock files for prepare, activate
authorSage Weil <sage@inktank.com>
Mon, 6 May 2013 18:40:52 +0000 (11:40 -0700)
committerGary Lowell <gary.lowell@inktank.com>
Mon, 6 May 2013 19:12:04 +0000 (12:12 -0700)
commit60603d01e59d02dda275d0991122c02ed800253d
treef2415c80477c833f1e3f228d809adb5d4b7e88cc
parente662b6140b4dbbf983884157188c4a93dba3ccda
ceph-disk: use separate lock files for prepare, activate

Use a separate lock file for prepare and activate to avoid deadlock.  This
didn't seem to trigger on all machines, but in many cases, the prepare
process would take the file lock and later trigger a udev event and the
activate would then block on the same lock, either when we explicitly call
'udevadm settle --timeout=10' or when partprobe does it on our behalf
(without a timeout!).   Avoid this by using separate locks for prepare
and activate.  We only care if multiple activates race; it is
okay for a prepare to be in progress and for an activate to be kicked
off.

Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph-disk