xapi-project / sm

Xapi Project storage managers
GNU Lesser General Public License v2.1
21 stars 91 forks source link

Make use of new fair locking subsystem #685

Closed TimSmithCtx closed 6 months ago

TimSmithCtx commented 6 months ago

Wrap calls to commands which need to access the device mapper in a context manager for a resource called "device-mapper" so that they get serialised in a fair manner (no queue-jumping like a lockfile would have).

TimSmithCtx commented 6 months ago

Using a "-" in the resource name causes the socket name to contain a "/" after being passed through systemd's substitutions, which causes All Sorts Of Trouble, so don't do that...