HomeFreeBSD

Obtain advisory lock on ZED PID file

Description

Obtain advisory lock on ZED PID file

ZED uses an advisory lock on its state file to protect against
multiple instances running concurrently. However, work is planned
to move this state information into the kernel, and ZED will still
need to protect against starting multiple instances.

This commit adds an advisory lock on the PID file to protect against
starting multiple instances. A lock failure can be overridden with
the "-f" (force) command-line option. The advisory lock on the state
file is being retained for as long as the state information is stored
in the state file.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2756

Details

Provenance
Chris Dunlap <cdunlap@llnl.gov>Authored on Oct 1 2014, 9:56 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 6 2014, 8:17 PM
Parents
rG057485504e3a: zfs send -p send properties only for snapshots that are actually sent
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG56697c42646f: Obtain advisory lock on ZED PID file (authored by Chris Dunlap <cdunlap@llnl.gov>).Oct 6 2014, 8:17 PM