[libvirt] [PATCH] virtlockd: acquire locks on re-exec
Martin Kletzander
mkletzan at redhat.com
Fri Mar 2 07:45:12 UTC 2018
On Thu, Mar 01, 2018 at 04:42:36PM -0700, Jim Fehlig wrote:
>Locks held by virtlockd are dropped on re-exec.
>
>virtlockd 94306 POSIX 5.4G WRITE 0 0 0 /tmp/test.qcow2
>virtlockd 94306 POSIX 5B WRITE 0 0 0 /run/virtlockd.pid
>virtlockd 94306 POSIX 5B WRITE 0 0 0 /run/virtlockd.pid
>
>Acquire locks in PostExecRestart code path.
>
>Signed-off-by: Jim Fehlig <jfehlig at suse.com>
>---
>
>The CLOEXEC flag is set in virLockSpaceNewPostExecRestart(), so I assume
>it is fine to call virFileLock() here as well.
>
I'm not that familiar with the internals of virtlockd, but I can't think
of what commands would the daemon run. So can't we just keep the fd's
without O_CLOEXEC? If not, then we could at least remove the flag
before re-exec (in PreExec) and then set it again back after (in
PostExec). But more opinions might be better.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180302/6cedfdcb/attachment-0001.sig>
More information about the libvir-list
mailing list